问题
SDK Version :
com.dji:dji-sdk-provided:4.9
com.dji:dji-uxsdk:4.9
com.dji:dji-sdk:4.9
Android Studio Version: 3.5.0
Gradle Version : 5.4.1
Android device Version : 5.1.1 (huawei pad)
enviroment : muti moudle and dji-sdk not import in main moudle
problem description: I had init sdk in my application first,when I run project,program crash when init and then I got this problem in logcat. can you help me? thanx very much! I had tried Dji-SDK 4.10 also but doesn't work still
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'
my application
@Override
protected void attachBaseContext(Context context) {
super.attachBaseContext(context);
com.secneo.sdk.Helper.install(this);
}
found error:
"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:
I had solved the problem after three days
1.open your project "local.properties" file ,and you can see
## 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
and now you just add one line on the previous line of the SDK path
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.now,you should be open your sdk.dir and find out like "ndk" or "ndk-bundle" folder ,then delete them(if you dont want to delete,you can rename like"ndk-test" , "ndk-bundle-test" or others you like). Don't worry about that, if you need to edit the NDK function,you can download in SDK-manager.but if you want build this project ,you must do it.
3.finally , rebuild,just so easy!!
来源:https://stackoverflow.com/questions/57671093/java-lang-unsatisfiedlinkerror-no-implementation-found-for-byte-dji-midware-n