When encountering the error mentioned above, you can check if you have called com.secneo.sdk.Helper.install to decrypt the SDK at the very beginning of your project. Here is a reference example: https://github.com/dji-sdk/Mobile-SDK-Android-V5/blob/dev-sdk-main/SampleCode-V5/android-sdk-v5-sample/src/main/java/dji/sampleV5/aircraft/DJIAircraftApplication.kt#L17
If you have already called com.secneo.sdk.Helper.install at the start but still encounter the same crash, you can try switching SDKManager.getInstance().init() to run on the main thread.
Comments
4 comments
Hello, I still have this issue too.I'am calling com.secneo.sdk.Helper.install and tried to run init() on the main thread. Is it possible the the error come from the connection to the DJI AppKey ? What kind of erro does it provide ? Here is mine.
FATAL EXCEPTION: main
Process: com.example.msdksample, PID: 29312
java.lang.NoClassDefFoundError: Failed resolution of: Ldji/v5/manager/interfaces/SDKManagerCallback;
at java.lang.Class.newInstance(Native Method)
Hello, don't know if you've fixed your error already. I've started with the sample example here and was getting the same error - https://developer.dji.com/doc/mobile-sdk-tutorial/en/quick-start/user-project-caution.html
What helped me was to move this line from MyApplication ( it can possible be any file ) into MainActivity inside onCreate method.
From the first glance, https://github.com/dji-sdk/Mobile-SDK-Android-V5/blob/dev-sdk-main/SampleCode-V5/android-sdk-v5-sample/src/main/java/dji/sampleV5/aircraft/DJIApplication.kt
You can try and move line 23 - msdkManagerVM.initMobileSDK(this) into MainActivity .
Hope it helps, GL
Copy the import from the sample project (see `GlobalVM.kt`, `MSDKManagerVM.kt` and `DJIApplication.kt`), and it should work.
Csongor Varady Hey could you elaborate a bit more ? II am trying to make the V5 MSDK Sample run and keep getting that error
Please sign in to leave a comment.