SDK版本 :
com.dji:dji-sdk-provided:4.9
com.dji:dji-uxsdk:4.9
com.dji:dji-sdk:4.9
Android Studio版本:
3.5.0
摇篮版本:
5.4.1
安卓设备版本:
5.1.1(华为平板)
环境:
多模块和 dji-sdk 未导入主模块
问题描述:
我的应用程序中首先有 init sdk,当我运行项目时,程序在 init 时崩溃,然后我在 logcat 中遇到了这个问题。
你能帮助我吗?
非常感谢!
我也尝试过 Dji-SDK 4.10 但仍然无法工作
gradle:
api ('com.dji:dji-sdk:4.9'){
exclude group: 'com.vividsolutions'
}
api('com.dji:dji-uxsdk:4.9') {
exclude group: 'com.vividsolutions'
}
compileOnly 'com.dji:dji-sdk-provided:4.9'
我的应用程序
@Override
protected void attachBaseContext(Context context) {
super.attachBaseContext(context);
com.secneo.sdk.Helper.install(this);
}
发现错误:
"java.lang.UnsatisfiedLinkError: No implementation found for byte[] dji.midware.natives.SDKRelativeJNI.native_getXXXX(java.lang.String) (tried Java_dji_midware_natives_SDKRelativeJNI_native_1getXXXX and Java_dji_midware_natives_SDKRelativeJNI_native_1getXXXX__Ljava_lang_String_2)
at dji.midware.natives.SDKRelativeJNI.native_getXXXX(Native Method)"
三天后我解决了这个问题
1.打开你的项目“local.properties”文件,你可以看到
## This file must *NOT* be checked into Version Control Systems,
# as it contains information specific to your local configuration.
#
# Location of the SDK. This is only used by Gradle.
# For customization when using a Version Control System, please read the
# header note.
#Thu Aug 29 17:07:04 CST 2019
sdk.dir=C\:\\Users\\admin\\AppData\\Local\\Android\\Sdk
现在您只需在 SDK 路径的前一行添加一行
ndk.dir=
results
## This file must *NOT* be checked into Version Control Systems,
# as it contains information specific to your local configuration.
#
# Location of the SDK. This is only used by Gradle.
# For customization when using a Version Control System, please read the
# header note.
#Thu Aug 29 17:07:04 CST 2019
ndk.dir=
sdk.dir=C\:\\Users\\admin\\AppData\\Local\\Android\\Sdk
2.现在,你应该打开你的sdk.dir并找到“ndk”或“ndk-bundle”文件夹,然后删除它们(如果你不想删除,你可以重命名为“ndk-test”,“ndk” -bundle-test”或其他你喜欢的)。不用担心,如果你需要编辑NDK功能,你可以在SDK-manager中下载。但是如果你想构建这个项目,你必须这样做。
3.最后,重建,就这么简单!!
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)