dji-sdk / Mobile-SDK-Android

DJI Mobile SDK for Android: http://developer.dji.com/mobile-sdk/
Other
985 stars 578 forks source link

the sample app crash in startup #568

Open zongoalbert opened 4 years ago

zongoalbert commented 4 years ago

i use the sample mobile sdk version 4.12 : when i want to open the app it's opened with white screen and closed in the same time , please need your help , you can ss in this following screenshot the startup of app :

image

image

zongoalbert commented 4 years ago

this is the message in Logcate enabling -Xcheck:jni (already on) 2020-07-20 10:45:08.980 7079-7079/? I/.dji.sdk.sampl: Unquickening 12 vdex files! 2020-07-20 10:45:08.981 7079-7079/? W/.dji.sdk.sampl: Unexpected CPU variant for X86 using defaults: x86 2020-07-20 10:45:09.019 7079-7079/com.dji.sdk.sample D/ApplicationLoaders: Returning zygote-cached class loader: /system/framework/android.test.base.jar 2020-07-20 10:45:09.021 7079-7079/com.dji.sdk.sample I/.dji.sdk.sampl: The ClassLoaderContext is a special shared library. 2020-07-20 10:45:09.030 7079-7079/com.dji.sdk.sample D/NetworkSecurityConfig: No Network Security Config specified, using platform default 2020-07-20 10:45:09.031 7079-7079/com.dji.sdk.sample D/NetworkSecurityConfig: No Network Security Config specified, using platform default 2020-07-20 10:45:09.033 7079-7079/com.dji.sdk.sample I/MultiDex: VM with version 2.1.0 has multidex support 2020-07-20 10:45:09.033 7079-7079/com.dji.sdk.sample I/MultiDex: Installing application 2020-07-20 10:45:09.033 7079-7079/com.dji.sdk.sample I/MultiDex: VM has multidex support, MultiDex support library is disabled. 2020-07-20 10:45:09.140 7079-7079/com.dji.sdk.sample W/.dji.sdk.sampl: Accessing hidden field Ldalvik/system/BaseDexClassLoader;->pathList:Ldalvik/system/DexPathList; (greylist, reflection, allowed) 2020-07-20 10:45:09.140 7079-7079/com.dji.sdk.sample W/.dji.sdk.sampl: Accessing hidden method Ldalvik/system/DexPathList;->makeInMemoryDexElements([Ljava/nio/ByteBuffer;Ljava/util/List;)[Ldalvik/system/DexPathList$Element; (greylist, JNI, allowed) 2020-07-20 10:45:09.221 7079-7079/com.dji.sdk.sample W/.dji.sdk.sampl: Accessing hidden field Ldalvik/system/DexPathList;->dexElements:[Ldalvik/system/DexPathList$Element; (greylist, reflection, allowed) 2020-07-20 10:45:09.261 7079-7106/com.dji.sdk.sample D/libEGL: loaded /vendor/lib/egl/libEGL_emulation.so 2020-07-20 10:45:09.262 7079-7106/com.dji.sdk.sample D/libEGL: loaded /vendor/lib/egl/libGLESv1_CM_emulation.so 2020-07-20 10:45:09.264 7079-7106/com.dji.sdk.sample D/libEGL: loaded /vendor/lib/egl/libGLESv2_emulation.so 2020-07-20 10:45:09.287 7079-7107/com.dji.sdk.sample E/linker: "/data/app/~~Pg7gax8z9EIt-pn-HwkmsQ==/com.dji.sdk.sample-c09nL2dp9WaMlv-yRsgHXA==/lib/x86/libffmpeg.so" has text relocations (https://android.googlesource.com/platform/bionic/+/master/android-changes-for-ndk-developers.md#Text-Relocations-Enforced-for-API-level-23) 2020-07-20 10:45:09.288 7079-7107/com.dji.sdk.sample W/System.err: java.lang.UnsatisfiedLinkError: dlopen failed: "/data/app/~~Pg7gax8z9EIt-pn-HwkmsQ==/com.dji.sdk.sample-c09nL2dp9WaMlv-yRsgHXA==/lib/x86/libffmpeg.so" has text relocations (https://android.googlesource.com/platform/bionic/+/master/android-changes-for-ndk-developers.md#Text-Relocations-Enforced-for-API-level-23) 2020-07-20 10:45:09.288 7079-7107/com.dji.sdk.sample W/System.err: at java.lang.Runtime.loadLibrary0(Runtime.java:1087) 2020-07-20 10:45:09.289 7079-7107/com.dji.sdk.sample W/System.err: at java.lang.Runtime.loadLibrary0(Runtime.java:1008) 2020-07-20 10:45:09.289 7079-7107/com.dji.sdk.sample W/System.err: at java.lang.System.loadLibrary(System.java:1664) 2020-07-20 10:45:09.289 7079-7107/com.dji.sdk.sample W/System.err: at dji.midware.natives.SDKRelativeJNI.<clinit>(Unknown Source:2) 2020-07-20 10:45:09.289 7079-7107/com.dji.sdk.sample W/System.err: at dji.midware.natives.SDKRelativeJNI.native_getUsbAccessoryAttachedString(Native Method) 2020-07-20 10:45:09.289 7079-7107/com.dji.sdk.sample W/System.err: at dji.sdk.sdkmanager.DJISDKManager.<clinit>(Unknown Source:32) 2020-07-20 10:45:09.289 7079-7107/com.dji.sdk.sample W/System.err: at dji.sdk.sdkmanager.DJISDKManager.getInstance(Unknown Source:0) 2020-07-20 10:45:09.289 7079-7107/com.dji.sdk.sample W/System.err: at com.dji.sdk.sample.internal.controller.MainActivity$5.run(:241) 2020-07-20 10:45:09.289 7079-7107/com.dji.sdk.sample W/System.err: at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:305) 2020-07-20 10:45:09.289 7079-7107/com.dji.sdk.sample W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 2020-07-20 10:45:09.289 7079-7107/com.dji.sdk.sample W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 2020-07-20 10:45:09.289 7079-7107/com.dji.sdk.sample W/System.err: at java.lang.Thread.run(Thread.java:923) 2020-07-20 10:45:09.289 7079-7107/com.dji.sdk.sample D/SDKRelativeJNI: Couldn't load lib 2020-07-20 10:45:09.289 7079-7107/com.dji.sdk.sample E/.dji.sdk.sampl: No implementation found for java.lang.String dji.midware.natives.SDKRelativeJNI.native_getUsbAccessoryAttachedString() (tried Java_dji_midware_natives_SDKRelativeJNI_native_1getUsbAccessoryAttachedString and Java_dji_midware_natives_SDKRelativeJNI_native_1getUsbAccessoryAttachedString__) 2020-07-20 10:45:09.291 7079-7107/com.dji.sdk.sample E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #1 Process: com.dji.sdk.sample, PID: 7079 java.lang.UnsatisfiedLinkError: No implementation found for java.lang.String dji.midware.natives.SDKRelativeJNI.native_getUsbAccessoryAttachedString() (tried Java_dji_midware_natives_SDKRelativeJNI_native_1getUsbAccessoryAttachedString and Java_dji_midware_natives_SDKRelativeJNI_native_1getUsbAccessoryAttachedString__) at dji.midware.natives.SDKRelativeJNI.native_getUsbAccessoryAttachedString(Native Method) at dji.sdk.sdkmanager.DJISDKManager.<clinit>(Unknown Source:32) at dji.sdk.sdkmanager.DJISDKManager.getInstance(Unknown Source:0) at com.dji.sdk.sample.internal.controller.MainActivity$5.run(:241) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:305) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:923) 2020-07-20 10:45:09.300 7079-7079/com.dji.sdk.sample W/.dji.sdk.sampl: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (greylist, reflection, allowed) 2020-07-20 10:45:09.300 7079-7079/com.dji.sdk.sample W/.dji.sdk.sampl: Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (greylist, reflection, allowed) 2020-07-20 10:45:09.313 7079-7107/com.dji.sdk.sample I/Process: Sending signal. PID: 7079 SIG: 9

dji-dev commented 4 years ago

Agent comment from William Wong in Zendesk ticket #37111:

Dear Client Thank you for contacting DJI.

We recommand you use real phone instead of virtual simulator.

Hopefully our solution can help you. Kindly Regards, DJI Developer Support

zongoalbert commented 4 years ago

Thank you so much it's work perfectly , could you please tell me why does not work with virtual simulator .

dji-dev commented 4 years ago

Agent comment from William Wong in Zendesk ticket #37111:

Dear Client Thank you for contacting DJI.

I think some of the low level hardware related functions influence so the simulator cannot provide it.

Hopefully our solution can help you. Kindly Regards, DJI Developer Support

jeryini commented 3 years ago

Hello @dji-dev !

I have encountered quite a few of these posts all over the Internet regarding this issue. May I suggest that DJI should develop a proper virtual simulator for hardware drones. Basically you would run it as a separate process that would simulate real drone via USB connection. This would help developers tremendously with developing new applications as currently the only way to debug and test functionality related to drone code is via real phone. As you can imagine this is quite cumbersome as it has to install the app every time. In the end it would save us all a lot of time and help development experience being more enjoyable.