我的 Native Activity 应用程序有一些问题。它适用于 99% 的设备。但有时用户会收到以下错误:
java.lang.RuntimeException: Unable to start activity ComponentInfo{nightradio.sunvox/nightradio.sunvox.MyNativeActivity}:
java.lang.IllegalArgumentException: Unable to find native library: sundog
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2070)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2095)
at android.app.ActivityThread.access$600(ActivityThread.java:134)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1203)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4830)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
at dalvik.system.NativeStart.main(Native Method)
...
我不明白为什么。该应用程序在 armeabi、armeabi-v7a 和 x86 文件夹中包含所有必要的库。它已经在许多具有不同架构的设备上进行了测试。
android:hasCode="true"选项存在。
我还注意到,这些有问题的设备中的大多数都有 Rockchip CPU(RK3066、RK2928、RK2926)。但不是所有的。最新的有华为 K3V2 CPU 和大量可用内存。另一个 Native Activity 应用程序(不是我的)也不能在最新的设备上运行。