Please select Into the mobile phone version | Continue to access the computer ver.
Waypoint V2
1549 4 2021-2-22
Uploading and Loding Picture ...(0/1)
o(^-^)o
djiuser_2XGnRvtr6Hq6
lvl.1
France
Offline

Hi,

I just purchase a Mavic 2 pro with smart controller.
Then compile the sample code that is available on the developper site.
And install it into the smart controller using Android studio and debuger mode.

all runs fine, except waypoint mission V2.
the app crashes immediately.

smart controller is running Android 7.1.2, when the sample is done with API level 29.

Please find the log of the event below.

Thanks

Gildas Vallee.

2021-02-22 16:10:55.957 3884-3895/com.dji.sdk.sample I/art: Background partial concurrent mark sweep GC freed 5533(1879KB) AllocSpace objects, 1(260KB) LOS objects, 21% free, 58MB/74MB, paused 3.201ms total 116.846ms
2021-02-22 16:10:56.109 3884-3980/com.dji.sdk.sample E/ContextUtil: com.dji.sdk.sample 3884
2021-02-22 16:10:57.610 3884-3980/com.dji.sdk.sample E/ContextUtil: com.dji.sdk.sample 3884
2021-02-22 16:10:57.665 3884-3884/com.dji.sdk.sample D/AndroidRuntime: Shutting down VM
2021-02-22 16:10:57.701 3884-3884/com.dji.sdk.sample E/DJICrashHandler: uncaughtException 3
2021-02-22 16:10:57.701 3884-3987/com.dji.sdk.sample E/UsbAccessoryService: final destroy() 71
2021-02-22 16:10:57.705 3884-3889/com.dji.sdk.sample I/art: Do full code cache collection, code=251KB, data=214KB
2021-02-22 16:10:57.711 3884-3889/com.dji.sdk.sample I/art: Starting a blocking GC JitCodeCache
2021-02-22 16:10:57.711 3884-3889/com.dji.sdk.sample I/art: After code cache collection, code=216KB, data=162KB
2021-02-22 16:10:57.802 3884-3987/com.dji.sdk.sample E/UsbAccessoryService: final destroy() 72
2021-02-22 16:10:57.802 3884-3987/com.dji.sdk.sample E/wm220: ****resetSwitchFromWifiFlag
2021-02-22 16:10:57.802 3884-3987/com.dji.sdk.sample E/DJIUsbAccessoryReceiver: receiver destroySession
2021-02-22 16:10:57.803 3884-3987/com.dji.sdk.sample E/DJIUsbAccessoryReceiver: Receiver not registered: dji.midware.usb.P3.DJIUsbAccessoryReceiver@6f7ef14
2021-02-22 16:10:57.803 3884-3987/com.dji.sdk.sample E/UsbAccessoryService: final destroy() 73
2021-02-22 16:10:57.803 3884-3987/com.dji.sdk.sample E/UsbAccessoryService: final destroy() 75
2021-02-22 16:10:57.803 3884-3987/com.dji.sdk.sample E/UsbAccessoryService: final destroy() 76

    --------- beginning of crash
2021-02-22 16:10:57.901 3884-3884/com.dji.sdk.sample E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.dji.sdk.sample, PID: 3884
    java.lang.RuntimeException: Class WaypointV2MissionOperatorView is missing a constructor that takes Context
        at com.dji.sdk.sample.internal.controller.ExpandableListAdapter.a(:158)
        at com.dji.sdk.sample.internal.controller.a.onClick(lambda)
        at android.view.View.performClick(View.java:5637)
        at android.view.View$PerformClick.run(View.java:22445)
        at android.os.Handler.handleCallback(Handler.java:755)
        at android.os.Handler.dispatchMessage(Handler.java:95)
        at android.os.Looper.loop(Looper.java:167)
        at android.app.ActivityThread.main(ActivityThread.java:6240)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1000)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:868)


    --------- beginning of system

2021-2-22
Use props
djiuser_2XGnRvtr6Hq6
lvl.1
France
Offline

Hi again gentlemen,

Please find more details on the error generated :

Thanks a lot for support.

java.lang.RuntimeException: Class WaypointV2MissionOperatorView is missing a constructor that takes Context
java.lang.RuntimeException: Could not dispatch event: class com.dji.sdk.sample.internal.model.ViewWrapper to handler [EventHandler public void com.dji.sdk.sample.internal.controller.MainActivity.onPushView(com.dji.sdk.sample.internal.model.ViewWrapper)]: Attempt to invoke interface method 'void dji.sdk.mission.waypoint.WaypointV2MissionOperator.addWaypointEventListener(dji.sdk.mission.waypoint.WaypointV2MissionOperatorListener)' on a null object reference
2021-2-22
Use props
Super pilot
lvl.4
Flight distance : 174905 ft
Russia
Offline

The fact that the application gets an error when launching Waypoints 2.0 on your drone is natural. All you need to do is read the DJI Mobile SDK Documentation carefully.
2021-2-22
Use props
kv886
lvl.4

Hong Kong
Offline

Because Mavic 2 doesn't support Waypoints 2.0. Waypoints 2.0 is only available on Matrice 300.
2021-2-22
Use props
djiuser_2XGnRvtr6Hq6
lvl.1
France
Offline

Sorry for disturbance, I posted the question too fast.
Class description is clear.
Next question I will look deeper before asking.

Please delete this post.
2021-2-22
Use props
Advanced
You need to log in before you can reply Login | Register now

Credit Rules