Hi, I'm trying to create a shared lib written in c++. I followed all the steps which are recommended to create the shared lib and to access the native code in Android. But so far I couldn't succeeded in loading the shared lib on device or emulator. When I tried to load the lib by:
static{ System.load("/data/data/com.android/libnative.so"); } I am getting this error: 10-26 11:16:57.269: DEBUG/dalvikvm(714): Trying to load lib /data/data/ com.android/libnative.so 0x435942a8 10-26 11:16:57.429: INFO/dalvikvm(714): Unable to dlopen(/data/data/ com.android/libnative.so): Cannot find library 10-26 11:16:57.489: DEBUG/AndroidRuntime(714): Shutting down VM 10-26 11:16:57.489: WARN/dalvikvm(714): threadid=3: thread exiting with uncaught exception (group=0x4000fe70) 10-26 11:16:57.519: ERROR/AndroidRuntime(714): Uncaught handler: thread main exiting due to uncaught exception 10-26 11:16:57.671: ERROR/AndroidRuntime(714): java.lang.UnsatisfiedLinkError: Library /data/data/com.android/ libnative.so not found 10-26 11:16:57.671: ERROR/AndroidRuntime(714): at java.lang.Runtime.load(Runtime.java:437) 10-26 11:16:57.671: ERROR/AndroidRuntime(714): at java.lang.System.load(System.java:536) ............................................................. Could anybody please help me out to resolve the above issue. I also came across this post which says that if the code is written in c++, we always get issues with shared lib. http://markmail.org/message/vxakxs6g5yplkdjv#query:unable%20to%20dlopen%20cannot%20load%20library+page:1+mid:wqdw3yf2gqh3g6w5+state:results Could anyone assert the above statement? I'm trying hard to get over this issue but so far couldn't get any fruitful result. I highly appreciate for your time and help. Thank you, Sanjay --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~----------~----~----~----~------~----~------~--~---