Android Question dji app crashing

shb777

Active Member
Licensed User
Longtime User
When I run Erel's drone mission, or my DJI app, connected to my drone, it always crashes the first time, then runs OK, usually the 2nd time, sometimes the third time. Any ideas why this would happen?
 

shb777

Active Member
Licensed User
Longtime User
but there's not gonna be an error message because i'm only running from my tablet. I'm running in release mode. I expect the app to crash when I'm not connected to the drone. Should I be using the Simulator or something else?
 
Last edited:
Upvote 0

shb777

Active Member
Licensed User
Longtime User
I'm writing your logs to a label on the app, and it's crashing in SDK_ProductChanged, saying no connected product. But the remote is saying it's connected, and giving the
correct battery level. Just now, after saying no connected product, it said product connected, and has been showing video and telemetry for a long time. So I'm assuming that even if SDK_ProductChanged returns no data, the app should keep running waiting for SDK_ProductChanged to be called again with data.
 
Upvote 0

shb777

Active Member
Licensed User
Longtime User
but the tablet has to be connected to the remote control, so it can't be connected to the pc except maybe via wifi. is that what you mean? I do have
B4X:
#bridgelogger True
 
Last edited:
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
The tablet is connected to the remotecontrol over usb cable or not?
And the tablet can use wifi to use b4a bridge to install the app from your pc

Your PC is then able to get the log over b4a bridge
 
Last edited:
Upvote 0

shb777

Active Member
Licensed User
Longtime User
yes the tablet has to be connected to the remote control via cable when i'm testing my app. i typically don't use wifi to connect via the bridge because it was unreliable
 
Upvote 0

shb777

Active Member
Licensed User
Longtime User
This morning I was running the exact same project that was running OK last night, and it was crashing. Now, after leaving the tablet on for a while, and maybe the drone
and remote control have warmed up a little, it's running OK. Typically, when I fly the drone, I don't worry about having things "warm up".

Actually, my program is almost exactly like drone mission now. I'm re writing it, and have
only added mapfragment, and a few labels.
 
Last edited:
Upvote 0

shb777

Active Member
Licensed User
Longtime User
I've found that when I take the mapfragment out with the designer my app doesn't crash. when it's in it crashes. i haven't changed any code at all.
 
Upvote 0

shb777

Active Member
Licensed User
Longtime User
Does this look correct for my manifest


B4X:
'************ Google Play Services Base ************
AddApplicationText(
   <activity android:name="com.google.android.gms.common.api.GoogleApiActivity"
  android:theme="@android:style/Theme.Translucent.NoTitleBar"
  android:exported="false"/>
    <meta-data
  android:name="com.google.android.gms.version"
  android:value="@integer/google_play_services_version" />
)
'************ Google Play Services Base (end) ************
 
Upvote 0

shb777

Active Member
Licensed User
Longtime User
I put gmap in drone mission and it's crashing. Here's the project.
 

Attachments

  • drone with gmap.zip
    12.8 KB · Views: 188
Upvote 0

shb777

Active Member
Licensed User
Longtime User
I did what you said here's the log:


Logger connected to: samsung SM-T820
--------- beginning of main
**************************** BaseApplication **************************
**************************** BaseApplication **************************
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
activation listener added
Registered successfully!
activation state: UNKNOWN
binding state: UNKNOWN
No connected product
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/dji/service/areacode/wire/DJIACCityListModel;
at com.dji.service.areacode.d.a(Unknown Source)
at com.dji.service.areacode.d.a(Unknown Source)
at com.dji.service.areacode.d.a(Unknown Source)
at com.dji.service.areacode.DJIAreaCodeManger.a(Unknown Source)
at com.dji.service.areacode.DJIAreaCodeManger.a(Unknown Source)
at com.dji.service.areacode.DJIAreaCodeManger$e$1.handleMessage(Unknown Source)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.os.HandlerThread.run(HandlerThread.java:61)
Caused by: java.lang.ClassNotFoundException: com.dji.service.areacode.wire.DJIACCityListModel
at java.lang.VMClassLoader.findLoadedClass(Native Method)
at java.lang.ClassLoader.findLoadedClass(ClassLoader.java:742)
at java.lang.ClassLoader.loadClass(ClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
... 9 more
Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/squareup/wire/Message;
... 9 more
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.squareup.wire.Message" on path: DexPathList[[zip file "/system/framework/com.android.future.usb.accessory.jar", zip file "/data/app/b4a.dji.waldo-1/base.apk", zip file "/data/user/0/b4a.dji.waldo/.cache_sdk/sdkclasses.jar"],nativeLibraryDirectories=[/data/app/b4a.dji.waldo-1/lib/arm64, /data/app/b4a.dji.waldo-1/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
... 9 more
--------- beginning of crash
** Activity (main) Pause, UserClosed = true **
sending message to waiting queue (sdk_productchanged)
sending message to waiting queue (sdk_activationstatechanged)
 
Upvote 0

shb777

Active Member
Licensed User
Longtime User
yes it's a new tablet. it runs 7 or 8. what should i do? do i need to add this
B4X:
#MultiDex: True

Actually, I already have this in.
 
Last edited:
Upvote 0

shb777

Active Member
Licensed User
Longtime User
no Like I've said, I've had the multidex statement in all along because my new app is based on drone mission
 
Last edited:
Upvote 0
Top