0
我上传了一个应用程序到playstore。该应用程序包含本机C代码。我使用NDK成功编译了它,创建了签名的apk。我还安装了已签名的apk并进行了检查。一切正常。NDK应用程序在Play商店上传后崩溃
上传后,我从playstore下载它,它崩溃了。
以下是堆栈跟踪:
java.lang.ExceptionInInitializerError
at java.lang.Class.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1319)
at android.app.Instrumentation.newActivity(Instrumentation.java:1057)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2015)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2125)
at android.app.ActivityThread.access$600(ActivityThread.java:140)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1227)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4898)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1006)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:773)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.UnsatisfiedLinkError: Couldn't load hello-jni: findLibrary returned null
at java.lang.Runtime.loadLibrary(Runtime.java:365)
at java.lang.System.loadLibrary(System.java:535)
at com.somepackage.anotherpackage.SomeActivity.<clinit>(SomeActivity.java:56)
... 15 more
该错误提示的System.loadLibrary返回null。但是使用eclipse运行时的相同代码工作正常。
感谢所有帮助
我检查了签名的apk并提取了它。它有libhello-jni.so。我不明白如果相同的代码上传到playstore,它不能执行 – user2335691 2013-04-30 12:18:18