本文介绍了UnsatisfiedLinkError:dlopen 失败:无法定位符号“strtof";由“libsupportjni.so"引用;在 API <20的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I'm getting the following error immediately on launch, but only for devices running API <20.

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

**edit: I initially reported this in Android Studio 2.4, and it's still an issue in Android Studio 3.0 stable

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)

推荐答案

转到运行 -> 编辑配置 -> 分析,并禁用启用高级分析".此功能当前与 API 相关问题

Go to Run -> Edit Configurations -> Profiling, and disable "Enable advanced profiling". This feature is not currently compatible with API <20, and will cause this or similar crashes. This may be fixed in the future, but as of Android Studio 2.4 preview 7, it's an open issue. Related issue

这篇关于UnsatisfiedLinkError:dlopen 失败:无法定位符号“strtof";由“libsupportjni.so"引用;在 API <20的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-13 22:05