dji-sdk / Mobile-SDK-Android

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

UnsatisfiedLinkError: No implementation found for byte[] dji.midware.natives.SDKRelativeJNI.native_getXXX (...) #388

Open aleksandrawy opened 5 years ago

aleksandrawy commented 5 years ago

Description: After updating android sdk to version 28 and DJI sdk from version 4.6 to 4.9 there is a problem with app working on any emulator. During DJI sdk registering app crashes.

DJI sdk: 4.9 Android sdk (compileSdkVersion): 28 Android system version: every Android device: emulator

Crash stacktrace:

java.lang.UnsatisfiedLinkError: No implementation found for byte[] dji.midware.natives.SDKRelativeJNI.native_getXXXX(java.lang.String) (tried Java_dji_midware_natives_SDKRelativeJNI_native_1getXXXX and Java_dji_midware_natives_SDKRelativeJNI_native_1getXXXX__Ljava_lang_String_2) at dji.midware.natives.SDKRelativeJNI.native_getXXXX(Native Method) at com.dji.h.a.a.c.b(Unknown Source) at dji.midware.e.b(Unknown Source) at dji.sdk.sdkmanager.DJISDKManager.(Unknown Source) at dji.sdk.sdkmanager.DJISDKManager.getInstance(Unknown Source) at PACKAGE_NAME.dji.DJIProvider$registerTask$1.run(DJIProvider.kt:39) at PACKAGE_NAME.dji.DJIProvider.startSDKRegistration(DJIProvider.kt:127) at PACKAGE_NAME.MainActivity$registerDJISDK$1.onExecutorReady(MainActivity.kt:595) at PACKAGE_NAME..helpers.ui.SimpleDelayedExecutor$executeDelayed$1.run(DelayedExecutor.kt:20) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5417) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

dji-sdk[bot] commented 5 years ago

Hi, there are two options for you to ask for help:

  1. Post your issues on StackOverflow: https://stackoverflow.com/questions/tagged/dji-sdk, the community can help you.

  2. Report your issues to dev@dji.com, as it's our official channel for developers to request DJI Developer Support now.

For DJI Developer Support, we have the following three tiers:

SChalice commented 5 years ago
  1. In Android Studio, when you create a new Virtual Device, when you get to Select a system image go to the Other images tab. From there select any of the 'arm' images and use that. The emulator will be extremely slow with this option, and might not run at all if your computer is old or slow.
  2. Connect a real Android device to your computer with debugging mode enabled and run the demo on that.
  3. In your build.gradle file, set compileSdkVersion and targetSdkVersion to 22 which is the latest version in which DJI's provided libffmpeg.so file will load. This is the worst option though, as Google doesn't allow anybody to publish apps with SDK versions this low anymore. The version must be 26 or above now: https://support.google.com/googleplay/android-developer/answer/113469#targetsdk
gsrathoreniks commented 4 years ago

@SChalice App working on Android Device but not on Emulator! @aleksandrawy Are you still facing the issue or this issue of yours is solved now?

ugiordan commented 4 years ago

Same issue here. You should upgrade the SDK so that we can use it with the latest version of Android.