java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.xlh.outside-1/base.apk", zip file "/data/app/com.xlh.outside-1/split_lib_dependencies_apk.apk", zip file "/data/app/com.xlh.outside-1/split_lib_slice_0_apk.apk", zip file "/data/app/com.xlh.outside-1/split_lib_slice_1_apk.apk", zip file "/data/app/com.xlh.outside-1/split_lib_slice_2_apk.apk", zip file "/data/app/com.xlh.outside-1/split_lib_slice_3_apk.apk", zip file "/data/app/com.xlh.outside-1/split_lib_slice_4_apk.apk", zip file "/data/app/com.xlh.outside-1/split_lib_slice_5_apk.apk", zip file "/data/app/com.xlh.outside-1/split_lib_slice_6_apk.apk", zip file "/data/app/com.xlh.outside-1/split_lib_slice_7_apk.apk", zip file "/data/app/com.xlh.outside-1/split_lib_slice_8_apk.apk", zip file "/data/app/com.xlh.outside-1/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]] couldn't find "libmonitor.so"
at java.lang.Runtime.loadLibrary(Runtime.java:366)
at java.lang.System.loadLibrary(System.java:988)
使用模拟调试的时候发现MUMU和夜神模拟器都不支持即时调试
虽然MUMU和夜神模拟器号称支持ARM架构下的APK,实际上都找不到地方设置,最终只能运行X86的APK,实际上项目中的SO文件仅支持ARM架构。。。。所以就悲剧了。。
还好AS生成APK的时候生成支持多个平台的APK,其中app-universal-release.apk是支持任意平台的,但不能进行即时调试,只能发布用,最后发现一款叫蓝叠的模拟器号称可以调试ARM的APK,但是编译调试的时候,AS没有成功给它装进APK,后面就没有测试了。。
注意要生成app-universal-release 需要配置build.gradle 加入以下
splits {
abi {
enable true
reset()
include 'x86','armeabi-v7a','armeabi'
universalApk true
}
}