dji-sdk / Mobile-SDK-Android

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

App Crashed when start up. #476

Open michael-destiny opened 4 years ago

michael-destiny commented 4 years ago

Hi, App with DJI sdk 4.11.1 crashed with following logs when user click app. Device: Huawei HONOR 7X Android version: 9

2020-02-11 14:08:51.265 10006-10006/research.com.xx E/sdk: install begin 2020-02-11 14:08:51.303 10006-10006/research.com.xx E/sdk: install begin 2020-02-11 14:08:51.825 10006-10035/? E/AwareLog: AtomicFileUtils: readFileLines file not exist: android.util.AtomicFile@99a7533 2020-02-11 14:08:51.826 10006-10035/? E/AwareLog: AtomicFileUtils: readFileLines file not exist: android.util.AtomicFile@eeba0f0 2020-02-11 14:08:51.836 10006-10023/? E/MemoryLeakMonitorManager: MemoryLeakMonitor.jar is not exist! 2020-02-11 14:08:52.259 10006-10006/?### E/linker: "/data/app/research.com.xx-XZ4Q2SxUXPqPUMz1uJdFRQ==/lib/arm64/libsfjni.so" .dynamic section has invalid offset: 0x9160, expected to match PT_DYNAMIC offset: 0x0 2020-02-11 14:08:52.263 10006-10006/? E/sfjni: Couldn't load lib 2020-02-11 14:08:52.264 10006-10006/? E/m.mastassistan: No implementation found for void com.dji.megatronking.stringfog.StringUtilsJNI.test() (tried Java_com_dji_megatronking_stringfog_StringUtilsJNI_test and Java_com_dji_megatronking_stringfog_StringUtilsJNI_test__) 2020-02-11 14:08:52.267 10006-10006/? E/AndroidRuntime: FATAL EXCEPTION: main

and I found the code in [linker_phdr.cpp] (https://android.googlesource.com/platform/bionic/+/master/linker/linker_phdr.cpp)

if (get_application_target_sdk_version() >= 26) { DL_ERR_AND_LOG("\"%s\" .dynamic section has invalid offset: 0x%zx, " "expected to match PTDYNAMIC offset: 0x%zx", name.c_str(), static_cast(dynamic_shdr->sh_offset), pt_dynamic_offset); return false; }

and I saw that Resolution: don't use tools that produce invalid/malformed ELF files. Note that using them puts application under high risk of being incompatible with future versions of Android.

Is this lib file malformat?

dji-dev commented 4 years ago

Public comment from Luce Luo in Zendesk ticket #32096:

Dear Michael,

Thank you for contacting DJI. In general, this issue will occur if you haven't added the necessary so files. Please refer to the official sample to check it. https://github.com/dji-sdk/Mobile-SDK-Android/blob/master/Sample%20Code/app/build.gradle

Thanks,

Luce Luo DJI Dev Team

michael-destiny commented 4 years ago

Hi Luce, It still the same problem, and I had adjust my build.gradle to add these so libraries...but it still keep crashing....

dji-dev commented 4 years ago

Public comment from Luce Luo in Zendesk ticket #32096:

Dear Michael,

Thank you for contacting DJI. You can try again the official sample and refer to it if any detail missing. https://github.com/dji-sdk/Mobile-SDK-Android

Thanks,

Luce Luo DJI Dev Team