1. Calling com.secneo.sdk.helper.install/com.cySdkyc.clx.Helper.install causes a crash:
JNI DETECTED ERROR IN APPLICATION: field operation on NULL object: 0xθ
in call to GetObjectField
from java.lang.String java.lang.Runtime.nativeLoad(java.lang.String, java.lang.ClassLoader, java.lang.Class)
solution:
Please select the options indicated below in Android Studio, and clear the cache before running it again.
2.Calling SDKManager.init causes a crash
java.lang.NoClassDefFoundError: Failed resolution of: Ldji/v5/common/callback/CommonCallbacks$CompletionCallback;
Solution:
- Check dependencies. Below is the correct way:
implementation 'com.dji:dji-sdk-v5-aircraft:{sdkversion}'
compileOnly 'com.dji:dji-sdk-v5-aircraft-provided:{sdkversion}'
- Check calling install function。Below is reference:
override fun attachBaseContext(base: Context?) {
super.attachBaseContext(base)
// 在调用 install 前,请勿调用任何 MSDK 相关
com.secneo.sdk.Helper.install(this)
}
- Move SDKManager.getInstance().init to be executed inside activity or main thread.
3.Compile with a resource file or R file not found
solution:
Please downgrade the gradle version to Gradle 7.x or configure android.nonTransitiveRClass = false in gradle.properties.
Comments
1 comment
Ahhhhhhh thank you Yating
The JNI DETECTED ERROR IN APPLICATION: field operation on NULL object: 0x0
.. was killing me! It occurred whenever I made any change to the code (even a newline) after installing and running the app the first time.
Please sign in to leave a comment.