I prepared according to the method a good online eclipse then also generated so file
I am running NDK's hello-jni example
After opening the package and there was so apk file is packaged into libhello-jni.so
I also modified the code changed
static {
System.loadLibrary ("libhello-jni.so");
} The "hello-jni.lib" added the "lib"
But with time running the simulator crashed used the example of the SDK is
2.2Does anyone encountered this problem ah? Help thank
I was developed under windows7 platform.
Error Log
04-13 02:41:43.662: ERROR / Zygote (33): setreuid () failed errno:. 2
04-13 02:41:51.282: ERROR / Zygote (33): setreuid () failed errno:. 17
04-13 02:41:52.522: ERROR / BatteryService (59): usbOnlinePath not found
04-13 02:41:52.522: ERROR / BatteryService (59): batteryVoltagePath not found
04-13 02:41:52.522: ERROR / BatteryService (59): batteryTemperaturePath not found
04-13 02:41:52.542: ERROR / SurfaceFlinger (59): Couldn't open / sys / power / wait_for_fb_sleep or / sys / power / wait_for_fb_wake
04-13 02:41:59.422: ERROR / EventHub (59): could not get driver version for / dev/input/mouse0, Not a typewriter
04-13 02:41:59.422: ERROR / EventHub (59): could not get driver version for / dev / input / mice, Not a typewriter
04-13 02:41:59.692: ERROR / System (59): Failure starting core service
04-13 02:41:59.692: ERROR / System (59): java.lang.SecurityException
04-13 02:41:59.692: ERROR / System (59): at android.os.BinderProxy.transact (Native Method)
04-13 02:41:59.692: ERROR / System (59): at android.os.ServiceManagerProxy.addService (ServiceManagerNative.java: 146)
04-13 02:41:59.692: ERROR / System (59): at android.os.ServiceManager.addService (ServiceManager.java: 72)
04-13 02:41:59.692: ERROR / System (59): at com.android.server.ServerThread.run (SystemServer.java: 184)
04-13 02:42:00.562: ERROR / SoundPool (59): error loading / system / media / audio / ui / Effect_Tick.ogg
04-13 02:42:00.572: ERROR / SoundPool (59): error loading / system / media / audio / ui / KeypressStandard.ogg
04-13 02:42:00.572: ERROR / SoundPool (59): error loading / system / media / audio / ui / KeypressSpacebar.ogg
04-13 02:42:00.572: ERROR / SoundPool (59): error loading / system / media / audio / ui / KeypressDelete.ogg
04-13 02:42:00.572: ERROR / SoundPool (59): error loading / system / media / audio / ui / KeypressReturn.ogg
04-13 02:42:03.413: ERROR / ThrottleService (59): Could not open GPS configuration file / etc / gps.conf
04-13 02:42:04.922: ERROR / logwrapper (144): executing / system / bin / tc failed: No such file or directory
04-13 02:42:05.022: ERROR / logwrapper (145): executing / system / bin / tc failed: No such file or directory
04-13 02:42:05.042: ERROR / logwrapper (146): executing / system / bin / tc failed: No such file or directory
04-13 02:42:20.249: ERROR / HierarchicalStateMachine (59): TetherMaster - unhandledMessage: msg.what = 3
04-13 03:23:34.869: ERROR / AndroidRuntime (276): FATAL EXCEPTION: main
04-13 03:23:34.869: ERROR / AndroidRuntime (276): java.lang.ExceptionInInitializerError
04-13 03:23:34.869: ERROR / AndroidRuntime (276): at java.lang.Class.newInstanceImpl (Native Method)
04-13 03:23:34.869: ERROR / AndroidRuntime (276): at java.lang.Class.newInstance (Class.java: 1429)
04-13 03:23:34.869: ERROR / AndroidRuntime (276): at android.app.Instrumentation.newActivity (Instrumentation.java: 1021)
04-13 03:23:34.869: ERROR / AndroidRuntime (276): at android.app.ActivityThread.performLaunchActivity (ActivityThread.java: 2577)
04-13 03:23:34.869: ERROR / AndroidRuntime (276): at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java: 2679)
04-13 03:23:34.869: ERROR / AndroidRuntime (276): at android.app.ActivityThread.access $ 2300 (ActivityThread.java: 125)
04-13 03:23:34.869: ERROR / AndroidRuntime (276): at android.app.ActivityThread $ H.handleMessage (ActivityThread.java: 2033)
04-13 03:23:34.869: ERROR / AndroidRuntime (276): at android.os.Handler.dispatchMessage (Handler.java: 99)
04-13 03:23:34.869: ERROR / AndroidRuntime (276): at android.os.Looper.loop (Looper.java: 123)
04-13 03:23:34.869: ERROR / AndroidRuntime (276): at android.app.ActivityThread.main (ActivityThread.java: 4627)
04-13 03:23:34.869: ERROR / AndroidRuntime (276): at java.lang.reflect.Method.invokeNative (Native Method)
04-13 03:23:34.869: ERROR / AndroidRuntime (276): at java.lang.reflect.Method.invoke (Method.java: 521)
04-13 03:23:34.869: ERROR / AndroidRuntime (276): at com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run (ZygoteInit.java: 868)
04-13 03:23:34.869: ERROR / AndroidRuntime (276): at com.android.internal.os.ZygoteInit.main (ZygoteInit.java: 626)
04-13 03:23:34.869: ERROR / AndroidRuntime (276): at dalvik.system.NativeStart.main (Native Method)
04-13 03:23:34.869: ERROR / AndroidRuntime (276): Caused by: java.lang.UnsatisfiedLinkError: Library libhello-jni not found
04-13 03:23:34.869: ERROR / AndroidRuntime (276): at java.lang.Runtime.loadLibrary (Runtime.java: 461)
04-13 03:23:34.869: ERROR / AndroidRuntime (276): at java.lang.System.loadLibrary (System.java: 557)
04-13 03:23:34.869: ERROR / AndroidRuntime (276): at com.example.hellojni.HelloJni
04-13 03:23:34.869: ERROR / AndroidRuntime (276): ... 15 more
04-13 04:55:16.259: ERROR / AndroidRuntime (306): FATAL EXCEPTION: main
04-13 04:55:16.259: ERROR / AndroidRuntime (306): java.lang.ExceptionInInitializerError
04-13 04:55:16.259: ERROR / AndroidRuntime (306): at java.lang.Class.newInstanceImpl (Native Method)
04-13 04:55:16.259: ERROR / AndroidRuntime (306): at java.lang.Class.newInstance (Class.java: 1429)
04-13 04:55:16.259: ERROR / AndroidRuntime (306): at android.app.Instrumentation.newActivity (Instrumentation.java: 1021)
04-13 04:55:16.259: ERROR / AndroidRuntime (306): at android.app.ActivityThread.performLaunchActivity (ActivityThread.java: 2577)
04-13 04:55:16.259: ERROR / AndroidRuntime (306): at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java: 2679)
04-13 04:55:16.259: ERROR / AndroidRuntime (306): at android.app.ActivityThread.access $ 2300 (ActivityThread.java: 125)
04-13 04:55:16.259: ERROR / AndroidRuntime (306): at android.app.ActivityThread $ H.handleMessage (ActivityThread.java: 2033)
04-13 04:55:16.259: ERROR / AndroidRuntime (306): at android.os.Handler.dispatchMessage (Handler.java: 99)
04-13 04:55:16.259: ERROR / AndroidRuntime (306): at android.os.Looper.loop (Looper.java: 123)
04-13 04:55:16.259: ERROR / AndroidRuntime (306): at android.app.ActivityThread.main (ActivityThread.java: 4627)
04-13 04:55:16.259: ERROR / AndroidRuntime (306): at java.lang.reflect.Method.invokeNative (Native Method)
04-13 04:55:16.259: ERROR / AndroidRuntime (306): at java.lang.reflect.Method.invoke (Method.java: 521)
04-13 04:55:16.259: ERROR / AndroidRuntime (306): at com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run (ZygoteInit.java: 868)
04-13 04:55:16.259: ERROR / AndroidRuntime (306): at com.android.internal.os.ZygoteInit.main (ZygoteInit.java: 626)
04-13 04:55:16.259: ERROR / AndroidRuntime (306): at dalvik.system.NativeStart.main (Native Method)
04-13 04:55:16.259: ERROR / AndroidRuntime (306): Caused by: java.lang.UnsatisfiedLinkError: Library / lib / armeabi / libhello-jni not found
.04-13 04:55:16.259: ERROR / AndroidRuntime (306): at java.lang.Runtime.loadLibrary (Runtime.java: 461)
04-13 04:55:16.259: ERROR / AndroidRuntime (306): at java.lang.System.loadLibrary (System.java: 557)
04-13 04:55:16.259: ERROR / AndroidRuntime (306): at com.example.hellojni.HelloJni
04-13 04:55:16.259: ERROR / AndroidRuntime (306): ... 15 more
04-13 04:57:39.959: ERROR / AndroidRuntime (338): FATAL EXCEPTION: main
04-13 04:57:39.959: ERROR / AndroidRuntime (338): java.lang.ExceptionInInitializerError
04-13 04:57:39.959: ERROR / AndroidRuntime (338): at java.lang.Class.newInstanceImpl (Native Method)
04-13 04:57:39.959: ERROR / AndroidRuntime (338): at java.lang.Class.newInstance (Class.java: 1429)
04-13 04:57:39.959: ERROR / AndroidRuntime (338): at android.app.Instrumentation.newActivity (Instrumentation.java: 1021)
04-13 04:57:39.959: ERROR / AndroidRuntime (338): at android.app.ActivityThread.performLaunchActivity (ActivityThread.java: 2577)
04-13 04:57:39.959: ERROR / AndroidRuntime (338): at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java: 2679)
04-13 04:57:39.959: ERROR / AndroidRuntime (338): at android.app.ActivityThread.access $ 2300 (ActivityThread.java: 125)
04-13 04:57:39.959: ERROR / AndroidRuntime (338): at android.app.ActivityThread $ H.handleMessage (ActivityThread.java: 2033)
04-13 04:57:39.959: ERROR / AndroidRuntime (338): at android.os.Handler.dispatchMessage (Handler.java: 99)
04-13 04:57:39.959: ERROR / AndroidRuntime (338): at android.os.Looper.loop (Looper.java: 123)
04-13 04:57:39.959: ERROR / AndroidRuntime (338): at android.app.ActivityThread.main (ActivityThread.java: 4627)
04-13 04:57:39.959: ERROR / AndroidRuntime (338): at java.lang.reflect.Method.invokeNative (Native Method)
04-13 04:57:39.959: ERROR / AndroidRuntime (338): at java.lang.reflect.Method.invoke (Method.java: 521)
04-13 04:57:39.959: ERROR / AndroidRuntime (338): at com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run (ZygoteInit.java: 868)
04-13 04:57:39.959: ERROR / AndroidRuntime (338): at com.android.internal.os.ZygoteInit.main (ZygoteInit.java: 626)
04-13 04:57:39.959: ERROR / AndroidRuntime (338): at dalvik.system.NativeStart.main (Native Method)
04-13 04:57:39.959: ERROR / AndroidRuntime (338): Caused by: java.lang.UnsatisfiedLinkError: Library / lib / armeabi / libhello-jni.so not found
.04-13 04:57:39.959: ERROR / AndroidRuntime (338): at java.lang.Runtime.loadLibrary (Runtime.java: 461)
04-13 04:57:39.959: ERROR / AndroidRuntime (338): at java.lang.System.loadLibrary (System.java: 557)
04-13 04:57:39.959: ERROR / AndroidRuntime (338): at com.example.hellojni.HelloJni
04-13 04:57:39.959: ERROR / AndroidRuntime (338): ... 15 more
<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
System.loadLibrary ("libhello-jni.so");
Parameter does not
Reply:
I used System.loadLibrary ("hello-jni")
System.loadLibrary ("libhello-jni")
Not work
Reply:
Configuration file correct?
Reply:
I doubt so the name does not correspond to your SYSTEM.loadlib
Reply:
I have encountered this problem today, basically determine your. So there is a problem, I modified after mk file was compiled correctly. Please check your landlord mk documents.
Reply:
LIB to look several load / with the way it
Reply:
System.loadLibrary ("libhello-jni.so");
Should be modified to
System.loadLibrary ("hello-jni");
Reply:
Android.mk and Mainfest.Xml sent to look
Reply:
I also encountered the same problem, the problem is. Mk file, change the library name is resolved, speechless!
Reply:
The reason of my problem is the inclusion of illegal characters (before the input is in the window), will re-enter all again, resolved. ubuntu 10.04
Reply:
Your landlord I have encountered such a problem. Tried many times, the Internet will not work. I do not know how to solve. They can run on the phone, I saw download / data / data / xx.xxx / lib / below. So library file called. I did not know why the emulator does not work on. Help. .
Reply:
5th Floor, positive solutions
Reply:
Libs folder and then add this folder in the new folder and then armeabi. So copy files under this directory.
Reply:
apk generate not, then look at the generated name libs / armeabi's so files that your application does not generate problems, generate successful System.loadLibrary ("your_lib_name"), you_lib_name for the name of the library without the lib prefix and. so suffix
Reply:
Why not be on the phone in the simulator ah?
Reply:
14th Floor, positive solutions, ah, help me solve the problem, thank you

Reply:
In libs \ armeabi folder to add so files (I was libjpush.so), add the following code block in class:.
static {
System.loadLibrary ("jpush");
}
No comments:
Post a Comment