whale icon indicating copy to clipboard operation
whale copied to clipboard

android编译需要的ndk版本是多少

Open 3c opened this issue 6 years ago • 2 comments

ndk16编译不过 用了ndk17,可以编译过,但是一运行app就crash

02-18 14:21:38.113 20993-20993/com.example.cx.testcompile E/Whale: Failed to resolve symbol : kArt_Object_CloneWithClass
02-18 14:21:38.113 20993-20993/com.example.cx.testcompile E/Whale: Runtime setup failed
02-18 14:21:38.114 20993-20993/com.example.cx.testcompile D/AndroidRuntime: Shutting down VM
02-18 14:21:38.114 20993-20993/com.example.cx.testcompile E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.example.cx.testcompile, PID: 20993
    java.lang.UnsatisfiedLinkError: JNI_ERR returned from JNI_OnLoad in "/data/app/com.example.cx.testcompile-2/lib/arm/libwhale.so"
        at java.lang.Runtime.loadLibrary(Runtime.java:372)
        at java.lang.System.loadLibrary(System.java:1076)
        at com.lody.whale.WhaleRuntime.<clinit>(WhaleRuntime.java:19)
        at com.lody.whale.xposed.XposedBridge.hookMethod(XposedBridge.java:100)
        at com.lody.whale.xposed.XposedHelpers.findAndHookMethod(XposedHelpers.java:187)
        at com.lody.whale.xposed.XposedHelpers.findAndHookMethod(XposedHelpers.java:263)
        at com.example.cx.testcompile.MainActivity.onCreate(MainActivity.java:23)
        at android.app.Activity.performCreate(Activity.java:6303)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2402)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2509)
        at android.app.ActivityThread.access$1000(ActivityThread.java:153)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1373)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:154)
        at android.app.ActivityThread.main(ActivityThread.java:5528)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:740)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:630)
        at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:102)
02-18 14:26:38.211 20993-20993/com.example.cx.testcompile W/MIUI-BLOCK-MONITOR: The binder call took 300094ms.
    java.lang.Throwable
        at android.os.AnrMonitor.checkBinderCallTime(AnrMonitor.java:354)
        at android.os.BinderProxy.transact(Binder.java:508)
        at android.app.ActivityManagerProxy.handleApplicationCrash(ActivityManagerNative.java:4458)
        at com.android.internal.os.RuntimeInit$UncaughtHandler.uncaughtException(RuntimeInit.java:169)
        at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:693)
        at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:690)

应该是build的原因,用build好的二进制就不会crash

3c avatar Feb 18 '19 06:02 3c

需要提供一下你的设备上的/system/lib64/libart.so

asLody avatar Feb 18 '19 07:02 asLody

libart.so.zip

机型是小米3w开发版,没有lib64这个文件夹

zip里的是 /system/lib/libart.so

3c avatar Feb 18 '19 07:02 3c