Greetings, I want to know how I can communicate between my application and my dji phantom 4 pro drone because I can't do it, I found this, thank you.
After upgrading to DJI Android SDK 4.4.1, my android project crashes with "java.lang.NoClassDefFoundError" error, how to fix it?
Since in the Android SDK 4.4.1, some of the SDK classes now need to be loaded before using. Loading process is done by Helper.install(). Developer needs to call this method before using any SDK functionality. Failing to do so will result in unexpected crashes.
Please make sure you don't miss the following steps:
- In your project's build.gradle file, please add the packagingOptions to avoid unexpected crashes, and also add the compile and provided dependencies to to import the DJI Android SDK maven dependency as shown in this Integrate SDK into Application tutorial.
- Create a new MApplication class and invoke the install() method of Helper class to load the SDK classes before using any SDK functionality. Failing to do so will result in unexpected crashes. Also, you should initialize SDK class objects (Like BaseProduct.BaseProductListener, BaseComponent.ComponentListener and DJISDKManager.SDKManagerCallback) inside the onCreate() method. For more details, please check the Creating a Camera Application tutorial.