System目录下APK无法加载DJI V5 SDK类
Completedinstall安装的apk可以正常使用SDK,但是预装在system目录下的apk无法加载SDK:
Caused by: java.lang.ClassNotFoundException: Didnt find class "dji.v5.inner.background.BackGroundWatcherInstaller" on path: DexPathList[[zip file "/system/app/vcs-app-release.apk"],nativeLibraryDirectories=[/system/lib64/vcs-app-release, /system/app/vcs-app-release.apk!/lib/arm64-v8a, /system/lib64, /system_ext/lib64, /system/lib64, /system_ext/lib64]]
请问有没有解决办法?
-
用v5的msdk集成到空白项目中也遇到这个错。代码走
com.secneo.sdk.Helper.install(this)
后app就会闪退。
尝试各种方法终于解决:
1、build.gradle(:app)文件的android 的defaultConfig底下要加
ndk {
abiFilters 'arm64-v8a'
}2、build.gradle(:app)文件的android底下要加
packagingOptions {
// 因为mrtc库内部使用了NDK的c++_shared的编译参数
// 与其他库重复引用了,因此选其中一个即可
pickFirst 'lib/arm64-v8a/libc++_shared.so'
pickFirst 'lib/armeabi-v7a/libc++_shared.so'
}3、依赖
dji-sdk-v5-aircraft-provided是compileOnly
dji-sdk-v5-aircraft是implementation
dji-sdk-v5-networkImp是runtimeOnly这个地方很容易报错
Please sign in to leave a comment.
Comments
12 comments