Android Question dji library communication error

PABLO2013

Well-Known Member
Licensed User
Longtime User
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:

  1. 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.
  2. 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.
 

PABLO2013

Well-Known Member
Licensed User
Longtime User
Greetings, thank you very much for the work of updating the library,

now the problem is the following, I have done the installation of everything again but it still remains, in the rest of the projects b4a works well, thanks

B4X:
B4A Versión: 10.5 BETA #1
Parseando código.    (0.03s)
    Java Versión: 8
Building folders structure.    (0.02s)
Corriendo accion personalizada.    (0.06s)
Compilando código.    (0.08s)
Compilado códigos de diseños.    (0.00s)
Organizando librerías.    (0.00s)
    (AndroidX SDK)
Generando el fichero R.    Error
c:\android\tools\..\extras\b4a_remote\androidx\constraintlayout\constraintlayout\2.0.2\unpacked-constraintlayout-2.0.2\res\values\values.xml:338: error: Attribute "android:alpha" has already been defined
c:\android\tools\..\extras\b4a_remote\androidx\constraintlayout\constraintlayout\2.0.2\unpacked-constraintlayout-2.0.2\res\values\values.xml:341: error: Attribute "android:translationX" has already been defined
c:\android\tools\..\extras\b4a_remote\androidx\constraintlayout\constraintlayout\2.0.2\unpacked-constraintlayout-2.0.2\res\values\values.xml:341: error: Attribute "android:translationY" has already been defined
c:\android\tools\..\extras\b4a_remote\androidx\constraintlayout\constraintlayout\2.0.2\unpacked-constraintlayout-2.0.2\res\values\values.xml:341: error: Attribute "android:translationZ" has already been defined
 
Upvote 0

PABLO2013

Well-Known Member
Licensed User
Longtime User
greetings, happy new year, sorry if I do not understand well.
1. I think the link is broken (I don't know if it is elsewhere).
2. In the sdk I can't get a list to be displayed with constraintlayout version must be 1.1.3. only version 2.0.4comes out (I don't know how to achieve it).
1609549498587.png
 
Upvote 0
Top