tgh
2009-09-04 12:26:43 UTC
I have tried to make the NDK-example application "HelloJni" be a
system application by the following steps:
1. generate the HelloJni.apk by Eclipse.
2. put HelloJni.apk into the directory /mydroid/out/target/product/
generic/system/app
3. cd /mydroid/; make snod
4. I get the "system.img" from /mydroid/out/target/product/generic/
5. Run the android emulator with the "system.img"
/data/data/com.example.hellojni,
and its sub-directory:
/data/data/com.example.hellojni/lib
However, the .so file "libhello-jni.so" didn't exist in "/data/data/
com.example.hellojni/lib/" or "/system/lib/"!!
And then, I get the "java.lang.UnsatisfiedLinkError" exception...
"libhello-jni.so" should be automatically copied to "/data/data/
com.example.hellojni/lib/" by android OS, isn't it?
(If I use "adb install HelloJni.apk" or put "libhello-jni.so" into "/
data/data/com.example.hellojni/lib/" mamually, the application runs
smoothly! )
My problem is that why the .so file "libhello-jni.so" didn't be copied
into "/data/data/com.example.hellojni/lib" automatically while
HelloJni.apk as a system application??
Does anyone know why?
Thanks!!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To post to this group, send email to android-***@googlegroups.com
To unsubscribe from this group, send email to android-ndk+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en
-~----------~----~----~----~------~----~------~--~---
system application by the following steps:
1. generate the HelloJni.apk by Eclipse.
2. put HelloJni.apk into the directory /mydroid/out/target/product/
generic/system/app
3. cd /mydroid/; make snod
4. I get the "system.img" from /mydroid/out/target/product/generic/
5. Run the android emulator with the "system.img"
From File Explorer in DDMS, I can see the file/directories
/system/app/HelloJni.apk,/data/data/com.example.hellojni,
and its sub-directory:
/data/data/com.example.hellojni/lib
However, the .so file "libhello-jni.so" didn't exist in "/data/data/
com.example.hellojni/lib/" or "/system/lib/"!!
And then, I get the "java.lang.UnsatisfiedLinkError" exception...
"libhello-jni.so" should be automatically copied to "/data/data/
com.example.hellojni/lib/" by android OS, isn't it?
(If I use "adb install HelloJni.apk" or put "libhello-jni.so" into "/
data/data/com.example.hellojni/lib/" mamually, the application runs
smoothly! )
My problem is that why the .so file "libhello-jni.so" didn't be copied
into "/data/data/com.example.hellojni/lib" automatically while
HelloJni.apk as a system application??
Does anyone know why?
Thanks!!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To post to this group, send email to android-***@googlegroups.com
To unsubscribe from this group, send email to android-ndk+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en
-~----------~----~----~----~------~----~------~--~---