Android Question DJI DRONES - ERROR

Roberto P.

Well-Known Member
Licensed User
Longtime User
Hi
I resumed my attempt to develop an app for DJI with the libraries of the post: https://www.b4x.com/android/forum/threads/dji-drones.75244/

I was able to activate the app DroneFirst but when it tries to connect from the following error..

**************************** BaseApplication **************************
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
activation listener added
Registered successfully!
No connected product
java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/util/Pools$SynchronizedPool;
at dji.midware.data.manager.P3.i$a.<clinit>(Unknown Source:0)
at dji.midware.data.manager.P3.i$a.obtain(Unknown Source:0)
at dji.midware.data.manager.P3.i.a(Unknown Source:5)
at dji.midware.usb.P3.UsbAccessoryService$1.onGetBody(Unknown Source:304)
at dji.midware.parser.plugins.b.c(Unknown Source:170)
at dji.midware.parser.plugins.b.a(Unknown Source:23)
at dji.midware.usb.P3.UsbAccessoryService$RecvBufferRunnable.run(Unknown Source:305)
at java.lang.Thread.run(Thread.java:764)
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.util.Pools$SynchronizedPool" on path: DexPathList[[zip file "/system/framework/com.android.future.usb.accessory.jar", zip file "/data/app/b4a.dji.test1-59uId5oyeV6PLep8H92nfw==/base.apk", zip file "/data/user/0/b4a.dji.test1/.cache_sdk/sdkclasses.jar"],nativeLibraryDirectories=[/data/app/b4a.dji.test1-59uId5oyeV6PLep8H92nfw==/lib/arm, /system/fake-libs, /data/app/b4a.dji.test1-59uId5oyeV6PLep8H92nfw==/base.apk!/lib/armeabi-v7a, /system/lib, /system/vendor/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:125)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
... 8 more
** Activity (main) Pause, UserClosed = true **


can anyone tell me what it refers to?

thank in advance
 

DonManfred

Expert
Licensed User
Longtime User
can anyone tell me what it refers to?
to a artifact from the old support library.

I guess you are using AndroidX.
You can try to add a reference in your main activity to
B4X:
#additionaljar: androidx.legacy:legacy-support-v4
 
Upvote 0

Roberto P.

Well-Known Member
Licensed User
Longtime User
Hi Manfred
thanks for your reply

but I have the same error

see the code below

B4X:
#BridgeLogger: true
#MultiDex: true
#AdditionalJar: dji-sdk-provided-4.4.1, ReferenceOnly
#Additionaljar: androidx.legacy:legacy-support-v4

thank for your
 
Upvote 0

Roberto P.

Well-Known Member
Licensed User
Longtime User
I'm working on a new version of DJI library.

Hi Erel
very interesting .... do you have any idea how much you could release it? I would like to develop with B4A and not with Android Studio.

Thanks in advance
regards
 
Upvote 0

Roberto P.

Well-Known Member
Licensed User
Longtime User
Tomorrow.

Great! Please send me a notify....

Not sure what you are asking. The updated library will behave very similarly to the old one.[/QUOTE said:
ok, if you release the sources we will make possible extensions.
Thanks again
 
Upvote 0
Top