2017-02-16 101 views
-2

此錯誤已被證明在我的logcat:無法編譯代碼的應用程序崩潰,此錯誤

java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "atof" referenced by "libhello-jni.so"... at java.lang.Runtime.loadLibrary(Runtime.java:364) at java.lang.System.loadLibrary(System.java:526) at com.example.hellojni.HelloJni.(HelloJni.java:36) at java.lang.Class.newInstanceImpl(Native Method) at java.lang.Class.newInstance(Class.java:1208) at android.app.Instrumentation.newActivity(Instrumentation.java:1067) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2297) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2471) at android.app.ActivityThread.access$900(ActivityThread.java:175) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1308) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:146) at android.app.ActivityThread.main(ActivityThread.java:5602) 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:1283) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099) at dalvik.system.NativeStart.main(Native Method)

問題是什麼?

回答

0

如果您正在使用一些本地庫,您可以使用下面的代碼使它看起來在特定的位置。把它放在build.gradle文件的defaultConfig

ndk { 
     abiFilters "armeabi-v7a", "x86", "armeabi", "mips" 
    }