Tuesday, February 19, 2013

[android-developers] about jni lib***.so question

Hi,all
    I had build an android sdk,I wanted to modify a apk which under the path "/system/app",but I am fail. When I added a jni interface to apk,I don`t know why it worked well with Eclipse ,but not in source code when I useed "mmm /package/apps/TimeSync".It show me"not jni.h".Then I builded the jni with "$NDK/ndk-build" first,and I got the lib***.so in the "./libs","../obj", and delete the file "jni/Android.mk", the cmd "mmm /package/apps/TimeSync" worked. But when I install the apk to the device,FC appeared and logcat showed "java.lang.UnsatisfiedLinkError:Library *** not found". And I push the lib***.so into the device "/system/lib", the apk worked. 
    Now I have some questions:
    When I build the apk in Eclipse, does Eclipse put the lib***.so into apk? Or does Eclipse push the lib***.so into device with "adb push lib***.so /system/lib" directly?
    If I install a apk with lib***.so with Eclipse,where can I find the lib***.so in the device?   Is the "/system/lib" or "/data/data/..."? 
    Why it show me "not jni.h"?  How to do when I want to build the jni with "mmm /package/apps/TimeSync"? 

--
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment