0

I am having a trouble when trying to import the package "android.content.pm" into my OSGi Bundle. This bundle uses the Package Manager to get the list of applications in Android and use one of them. But when i try to import this packege i receive the message:

11-06 10:56:30.550: E/CACManager(7483): org.osgi.framework.BundleException: Unresolved constraint in bundle QRCodeCAC [1]: Unable to resolve 1.0: missing requirement [1.0] osgi.wiring.package; (osgi.wiring.package=android.content.pm.PackageManager)
WitaloBenicio
  • 3,395
  • 5
  • 25
  • 32
  • Is there a bundle exporting that package? If you want to import it, some bundle needs to export it. – BJ Hargrave Nov 06 '14 at 18:05
  • I have android.jar in a lib folder in the bundle. I can import android.content but android.content.pm is not exported – WitaloBenicio Nov 06 '14 at 22:15
  • Well if your bundle include the jar in its lib folder, you don't need to import the package (since no bundle exports it). You need to put that jar on the Bundle-Classpath[http://www.osgi.org/javadoc/r4v43/core/org/osgi/framework/Constants.html#BUNDLE_CLASSPATH] of your bundle. – BJ Hargrave Nov 07 '14 at 21:45
  • If i dont import i receive an error that says: Attempt to get lenght of a null array – WitaloBenicio Nov 07 '14 at 21:47

0 Answers0