使用Android Studio 3.2 模拟器:像素运行API 27
在UXSDKDemo和sample.UX.SDK应用程序中都会发生这种情况。
侧面说明: 这些演示的开发人员似乎并没有使用最新的Android Studio(3.2)或构建工具(28)。演示需要对gradle文件进行大量调整才能编译它们。 P
堆栈跟踪:
2018-10-02 15:20:19.584 4336-4336/com.dji.uxsdkdemo I/InstantRun: starting instant run server: is main process
2018-10-02 15:20:19.614 4336-4336/com.dji.uxsdkdemo E/linker: "/data/app/com.dji.uxsdkdemo-Dlc2GPwBk6IhtAWGOTyhnQ==/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)
2018-10-02 15:20:19.615 4336-4336/com.dji.uxsdkdemo W/System.err: java.lang.UnsatisfiedLinkError: dlopen failed: "/data/app/com.dji.uxsdkdemo-Dlc2GPwBk6IhtAWGOTyhnQ==/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)
2018-10-02 15:20:19.616 4336-4336/com.dji.uxsdkdemo W/System.err: at java.lang.Runtime.loadLibrary0(Runtime.java:1016)
2018-10-02 15:20:19.616 4336-4336/com.dji.uxsdkdemo W/System.err: at java.lang.System.loadLibrary(System.java:1657)
2018-10-02 15:20:19.616 4336-4336/com.dji.uxsdkdemo W/System.err: at dji.midware.natives.SDKRelativeJNI.(Unknown Source:2)
2018-10-02 15:20:19.617 4336-4336/com.dji.uxsdkdemo W/System.err: at dji.midware.natives.SDKRelativeJNI.native_getXXXX(Native Method)
2018-10-02 15:20:19.617 4336-4336/com.dji.uxsdkdemo W/System.err: at com.dji.g.a.a.b.a(Unknown Source:24)
2018-10-02 15:20:19.617 4336-4336/com.dji.uxsdkdemo W/System.err: at com.dji.g.a.a.b.a(Unknown Source:5)
2018-10-02 15:20:19.617 4336-4336/com.dji.uxsdkdemo W/System.err: at dji.sdk.sdkmanager.DJISDKManager.(Unknown Source:2)
2018-10-02 15:20:19.617 4336-4336/com.dji.uxsdkdemo W/System.err: at dji.sdk.sdkmanager.DJISDKManager.getInstance(Unknown Source:0)
2018-10-02 15:20:19.617 4336-4336/com.dji.uxsdkdemo W/System.err: at com.dji.uxsdkdemo.DemoApplication.onCreate(DemoApplication.java:66)
2018-10-02 15:20:19.618 4336-4336/com.dji.uxsdkdemo W/System.err: at com.dji.uxsdkdemo.MApplication.onCreate(MApplication.java:24)
2018-10-02 15:20:19.618 1659-2714/system_process W/ActivityManager: Background start not allowed: service Intent { cmp=com.google.android.videos/.service.pinning.TransferService (has extras) } to com.google.android.videos/.service.pinning.TransferService from pid=4352 uid=10074 pkg=com.google.android.videos
2018-10-02 15:20:19.618 4336-4336/com.dji.uxsdkdemo W/System.err: at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1119)
2018-10-02 15:20:19.618 4336-4336/com.dji.uxsdkdemo W/System.err: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5740)
2018-10-02 15:20:19.618 4336-4336/com.dji.uxsdkdemo W/System.err: at android.app.ActivityThread.-wrap1(Unknown Source:0)
2018-10-02 15:20:19.619 4336-4336/com.dji.uxsdkdemo W/System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1656)
2018-10-02 15:20:19.619 4336-4336/com.dji.uxsdkdemo W/System.err: at android.os.Handler.dispatchMessage(Handler.java:106)
2018-10-02 15:20:19.619 4336-4336/com.dji.uxsdkdemo W/System.err: at android.os.Looper.loop(Looper.java:164)
2018-10-02 15:20:19.619 4336-4336/com.dji.uxsdkdemo W/System.err: at android.app.ActivityThread.main(ActivityThread.java:6494)
2018-10-02 15:20:19.619 4336-4336/com.dji.uxsdkdemo W/System.err: at java.lang.reflect.Method.invoke(Native Method)
2018-10-02 15:20:19.619 4336-4336/com.dji.uxsdkdemo W/System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
2018-10-02 15:20:19.619 4336-4336/com.dji.uxsdkdemo W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
2018-10-02 15:20:19.620 4336-4336/com.dji.uxsdkdemo E/zygote: 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)
2018-10-02 15:20:19.623 4336-4336/com.dji.uxsdkdemo E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.dji.uxsdkdemo, PID: 4336
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.g.a.a.b.a(Unknown Source:24)
at com.dji.g.a.a.b.a(Unknown Source:5)
at dji.sdk.sdkmanager.DJISDKManager.(Unknown Source:2)
at dji.sdk.sdkmanager.DJISDKManager.getInstance(Unknown Source:0)
at com.dji.uxsdkdemo.DemoApplication.onCreate(DemoApplication.java:66)
at com.dji.uxsdkdemo.MApplication.onCreate(MApplication.java:24)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1119)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5740)
at android.app.ActivityThread.-wrap1(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1656)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
2018-10-02 15:20:19.632 1659-2491/system_process W/ActivityManager: Force finishing activity com.dji.uxsdkdemo/.MainActivity
答案 0 :(得分:0)
我认为您不能只使用仿真器,还必须将login in SDK to generate APP key添加到android Manifest file example中。您需要Android Wireless Debug / DJI Android bridge App(其他设备)来启动。
我的建议是不要在提示时升级gradle,下次再做。首先运行演示。希望有帮助。