UnsatisfiedLinkError: dlopen failed: 在 API <20 上找不到“libsupportjni.so”引用的符号“strtof”

Posted

技术标签:

【中文标题】UnsatisfiedLinkError: dlopen failed: 在 API <20 上找不到“libsupportjni.so”引用的符号“strtof”【英文标题】:UnsatisfiedLinkError: dlopen failed: cannot locate symbol "strtof" referenced by "libsupportjni.so" on API <20 【发布时间】:2017-05-02 18:58:41 【问题描述】:

我在启动时立即收到以下错误,但仅适用于运行 API

**edit:我最初在 android Studio 2.4 中报告了此问题,但在 Android Studio 3.0 稳定版中仍然存在问题

D/dalvikvm: Trying to load lib /mnt/asec/[[packagename]]-1/lib/libsupportjni.so 0x41b13f30
E/dalvikvm: dlopen("/mnt/asec/[[packagename]]-1/lib/libsupportjni.so") failed: dlopen failed: cannot locate symbol "strtof" referenced by "libsupportjni.so"...
W/dalvikvm: Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lcom/android/tools/profiler/support/ProfilerService;
D/AndroidRuntime: Shutting down VM
W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x41659ce0)
E/AndroidRuntime: FATAL EXCEPTION: main
              Process: [[packagename]], PID: 7500
              java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "strtof" referenced by "libsupportjni.so"...
                  at java.lang.Runtime.loadLibrary(Runtime.java:364)
                  at java.lang.System.loadLibrary(System.java:526)
                  at com.android.tools.profiler.support.ProfilerService.<clinit>(ProfilerService.java:44)
                  at [[packagename]].App.<init>(App.kt:25)
                  at java.lang.Class.newInstanceImpl(Native Method)
                  at java.lang.Class.newInstance(Class.java:1208)
                  at android.app.Instrumentation.newApplication(Instrumentation.java:990)
                  at android.app.Instrumentation.newApplication(Instrumentation.java:975)
                  at android.app.LoadedApk.makeApplication(LoadedApk.java:509)
                  at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4446)
                  at android.app.ActivityThread.access$1500(ActivityThread.java:144)
                  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1265)
                  at android.os.Handler.dispatchMessage(Handler.java:102)
                  at android.os.Looper.loop(Looper.java:136)
                  at android.app.ActivityThread.main(ActivityThread.java:5146)
                  at java.lang.reflect.Method.invokeNative(Native Method)
                  at java.lang.reflect.Method.invoke(Method.java:515)
                  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:732)
                  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:566)
                  at dalvik.system.NativeStart.main(Native Method)

【问题讨论】:

【参考方案1】:

转到运行 -> 编辑配置 -> 分析,然后禁用“启用高级分析”。此功能当前与 API Related issue

【讨论】:

这也适用于 dlopen failed: cannot locate symbol "__aeabi_memclr4" referenced by "/data/app/**/libsupportjni.so" 我使用 Android Studio 3.0 canary 6 在 API 23 上获得的class="comcopy">跨度> @Alex 我遇到了同样的问题,并已将此问题报告给 Android Studio 团队:issuetracker.google.com/issues/63756889 它仍在 AS 3.0 beta 2 中发生 为什么他们不自动绕过旧版本设备,工作室的这种行为太烦人了 这发生在 AS 3.0 稳定版中,brrrrrr。谷歌,像往常一样(

以上是关于UnsatisfiedLinkError: dlopen failed: 在 API <20 上找不到“libsupportjni.so”引用的符号“strtof”的主要内容,如果未能解决你的问题,请参考以下文章

UnsatisfiedLinkError:找不到依赖库

Java 问题“UnsatisfiedLinkError”

谷歌或工具:UnsatisfiedLinkError

JNR UnsatisfiedLinkError

为啥我会在本机代码中收到此 UnsatisfiedLinkError?

UnsatisfiedLinkError探案录