开发者

Android context & OSGi Bundle

I'm actually working on OSGi on An开发者_如何学编程droid, and I'm close to reach my goal, but there's one little problem.

The framework (Apache Felix) is running successfully. The problem comes from Bundles that want to get Context of the Application. I just can't try to use them, because at runtime, I've got a beautiful "Could not find classe Android.content.Context", refrenced from [...]. (And then come a NoClassDefFoundError when trying to get the ServiceReference)

I linked the Android.jar to the Bundle, but it doesn't seems to be enough (even if compilation is ok). Maybe it's the way I'm creating the bundle that's wrong, I juste export it as a .jar when finished.

So if you've got some tips about how to solve this problem, they're welcome ;)

Thanks !


Ok, I'm finally done with it. I am a fool, really.

In the Manifest.mf, section "Import-Package", don't forgot to add android.content

It now works perfectly ;)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜