专注于音视频处理及流媒体开发!

罗索实验室

当前位置: 主页>嵌入式开发>Android>

Android NDK: dlopen failed: cannot locate symbol “__gnu_thu

时间:2015-09-16 10:32来源:stackoverflow 作者:deko 点击:
Android NDK: dlopen failed: cannot locate symbol “__gnu_thumb1_case_uqi”
TAG: NDK  gnustl_static  gnustl_shared  


My NDK game works well in Debug mode, but crashes in release with the following log on Nexus 7:

Issue:

E dalvikvm: dlopen("/data/app-lib/com.js.pathoflight-1/libPathOfLight.so") failed: dlopen failed: cannot locate symbol "__gnu_thumb1_case_uqi" referenced by
"libPathOfLight.so"... 
W dalvikvm: Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lcom/js  /pathoflight/JSNativeActivity; 
W dalvikvm: Class init failed in newInstance call (Lcom/js/pathoflight/JSNativeActivity;) 
D AndroidRuntime: Shutting down VM 
W dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x41b01700) 
E AndroidRuntime: FATAL EXCEPTION: main 
E AndroidRuntime: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol   "__gnu_thumb1_case_uqi" referenced by "libPathOfLight.so"... 
E AndroidRuntime:   at java.lang.Runtime.loadLibrary(Runtime.java:361) 
E AndroidRuntime:   at java.lang.System.loadLibrary(System.java:525) 
E AndroidRuntime:   at com.js.pathoflight.JSNativeActivity.<clinit>(JSNativeActivity.java:59) 
E AndroidRuntime:   at java.lang.Class.newInstanceImpl(Native Method)   
E AndroidRuntime:   at java.lang.Class.newInstance(Class.java:1130) 
E AndroidRuntime:   at android.app.Instrumentation.newActivity(Instrumentation.java:1061) 
E AndroidRuntime:   at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2128) 
E AndroidRuntime:   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261) 
E AndroidRuntime:   at android.app.ActivityThread.access$600(ActivityThread.java:141)
E AndroidRuntime:   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
E AndroidRuntime:   at android.os.Handler.dispatchMessage(Handler.java:99) 
E AndroidRuntime:   at android.os.Looper.loop(Looper.java:137) 
E AndroidRuntime:   at android.app.ActivityThread.main(ActivityThread.java:5103) 
E AndroidRuntime:   at java.lang.reflect.Method.invokeNative(Native Method) 
E AndroidRuntime:   at java.lang.reflect.Method.invoke(Method.java:525) 
E AndroidRuntime:   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737) 
E AndroidRuntime:   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) 
E AndroidRuntime:   at dalvik.system.NativeStart.main(Native Method) 
W ActivityManager:   Force finishing activity com.js.pathoflight/.JSNativeActivity

Solution:

While removing different parts of the code I found that the issue was in a 3rd party library I used.
I changed its usage from "gnustl_static" version (.a) to "gnustl_shared" (.so) one and the problem disappeared!

 

(责任编辑:落鹤生)
本站文章除注明转载外,均为本站原创或编译欢迎任何形式的转载,但请务必注明出处,尊重他人劳动,同学习共成长。转载请注明:文章转载自:罗索实验室 [http://www.rosoo.net/a/201509/17384.html]
本文出处:stackoverflow 作者:deko 原文
顶一下
(0)
0%
踩一下
(0)
0%
------分隔线----------------------------
栏目列表
将本文分享到微信
织梦二维码生成器
推荐内容