Android shared library which is not JNI based
Posted
by Mondain
on Stack Overflow
See other posts from Stack Overflow
or by Mondain
Published on 2010-04-22T17:51:04Z
Indexed on
2010/04/22
17:53 UTC
Read the original article
Hit count: 237
I am developing a library for Android applications which does not use native code (JNI). I have tried suppling the library as an external jar in my Android projects but this method does not include the library contents in the apk and thus throws class not found errors when run in the emulator or device. I have also tried creating the library as an Android project in itself and this does work, but only for public static properties (not methods). With the library and application both being in separate apk's I can see that the VM notices references to the library and can read some properties, but when an attempt to instantiate a class in the library is executed I get class not found even though I can read the public static properties from it (very frustrating!!).
I realize that Davlik byte code is not the same as Java byte code but I am having trouble even finding good information about how to solve what would seem to be a very simple issue in Android. I am looking into the old PlatformLibrary stuff right now but I am not convinced this will work either since the sample has been removed from the Android site :(
So help me out if you can, if I find the answer before this happens I will share it.
viva la Android!
© Stack Overflow or respective owner