0

我从 github ( https://github.com/dji-sdk/Mobile-SDK-Android ) 下载了新的 SDK 演示 (v3) 并使用 Android Studio (1.5.1) 打开项目。导入进展顺利,一切看起来都很好。

除了 dji 应用程序键之外,我没有更改代码或设置,但是当我尝试启动应用程序时(在带有 Android 6 的 Nexus 9 上)我在 android 监视器中收到以下消息:

01-13 21:57:06.052 com.dji.sdk.sample I/art: Late-enabling -Xcheck:jni
01-13 21:57:06.129 com.dji.sdk.sample D/FPVController: try to load libstlport_shared.so
01-13 21:57:06.132 com.dji.sdk.sample D/FPVController: try to load libdjivideo.so
01-13 21:57:06.139 com.dji.sdk.sample E/linker: /data/app/com.dji.sdk.sample-1/lib/arm/libdjivideo.so: has text relocations
01-13 21:57:06.139 com.dji.sdk.sample E/FPVController: Couldn't load lib
01-13 21:57:06.192 com.dji.sdk.sample E/art: No implementation found for int dji.midware.natives.FPVController.native_init(java.lang.Object) (tried Java_dji_midware_natives_FPVController_native_1init and Java_dji_midware_natives_FPVController_native_1init__Ljava_lang_Object_2)
01-13 21:57:06.192 com.dji.sdk.sample D/AndroidRuntime: Shutting down VM
01-13 21:57:06.199 com.dji.sdk.sample W/System.err: java.io.FileNotFoundException: /storage/emulated/0/DJI/com.dji.sdk.sample/LOG/CRASH/crash-2016-01-13-21-57-06.txt: open failed: ENOENT (No such file or directory)
01-13 21:57:06.199 com.dji.sdk.sample W/System.err:     at libcore.io.IoBridge.open(IoBridge.java:452)
01-13 21:57:06.199 com.dji.sdk.sample W/System.err:     at java.io.FileOutputStream.<init>(FileOutputStream.java:87)
01-13 21:57:06.199 com.dji.sdk.sample W/System.err:     at java.io.FileOutputStream.<init>(FileOutputStream.java:127)
01-13 21:57:06.199 com.dji.sdk.sample W/System.err:     at java.io.FileOutputStream.<init>(FileOutputStream.java:116)
01-13 21:57:06.199 com.dji.sdk.sample W/System.err:     at dji.publics.b.f.b(Unknown Source)
01-13 21:57:06.199 com.dji.sdk.sample W/System.err:     at dji.publics.b.f.a(Unknown Source)
01-13 21:57:06.199 com.dji.sdk.sample W/System.err:     at dji.publics.b.f.uncaughtException(Unknown Source)
01-13 21:57:06.199 com.dji.sdk.sample W/System.err:     at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:693)
01-13 21:57:06.199 com.dji.sdk.sample W/System.err:     at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:690)
01-13 21:57:06.199 com.dji.sdk.sample W/System.err: Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
01-13 21:57:06.199 com.dji.sdk.sample W/System.err:     at libcore.io.Posix.open(Native Method)
01-13 21:57:06.199 com.dji.sdk.sample W/System.err:     at libcore.io.BlockGuardOs.open(BlockGuardOs.java:186)
01-13 21:57:06.199 com.dji.sdk.sample W/System.err:     at libcore.io.IoBridge.open(IoBridge.java:438)
01-13 21:57:06.199 com.dji.sdk.sample W/System.err:  ... 8 more
01-13 21:57:06.200 com.dji.sdk.sample E/DJICrashHandler: uncaughtException 2
01-13 21:57:06.200 com.dji.sdk.sample E/DJICrashHandler: uncaughtException 3
01-13 21:57:06.226 com.dji.sdk.sample I/onLoad: loaded onLoad.cpp :JNI_OnLoad() go to end
01-13 21:57:06.226 com.dji.sdk.sample D/GroudStation: load lib suc
01-13 21:57:06.234 com.dji.sdk.sample D/DJIGimbalParamInfoManager: readToMemory size = 19
01-13 21:57:06.300 com.dji.sdk.sample D/DJIFlycParamInfoManager: readToMemory size = 583
01-13 21:57:06.401 com.dji.sdk.sample E/DJICrashHandler: uncaughtException 4
01-13 21:57:06.402 com.dji.sdk.sample E/AndroidRuntime: FATAL EXCEPTION: main
                                                     Process: com.dji.sdk.sample, PID: 3145                                                       java.lang.UnsatisfiedLinkError: No implementation found for int dji.midware.natives.FPVController.native_init(java.lang.Object) (tried Java_dji_midware_natives_FPVController_native_1init and Java_dji_midware_natives_FPVController_native_1init__Ljava_lang_Object_2)
                                                         at dji.midware.natives.FPVController.native_init(Native Method)
                                                         at dji.midware.data.manager.P3.ServiceManager.<init>(Unknown Source)
                                                         at dji.midware.data.manager.P3.ServiceManager.getInstance(Unknown Source)
                                                         at dji.sdk.SDKManager.DJISDKManager.initParams(Unknown Source)
                                                         at dji.sdk.SDKManager.DJISDKManager.initSDKManager(Unknown Source)
                                                         at com.dji.sdk.sample.common.DJISampleApplication.onCreate(DJISampleApplication.java:71)
                                                         at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1013)
                                                         at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4707)
                                                         at android.app.ActivityThread.-wrap1(ActivityThread.java)
                                                         at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1405)
                                                         at android.os.Handler.dispatchMessage(Handler.java:102)
                                                         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)
01-13 21:57:31.447 com.dji.sdk.sample I/Process: Sending signal. PID: 13145 SIG: 9

并且应用程序将直接在 android 平板电脑上关闭。任何人都可以帮助我并告诉我我做错了什么吗?为什么不能只下载并启动 sdk 演示?

提前致谢!问候

4

2 回答 2

2

问题是应用程序中的 Android 版本,因为 SDK Lib 是使用 android 级别 22 构建的,而应用程序是使用 android 级别 23 构建的。

将应用程序减少到版本 22 后,应用程序正在运行!

于 2016-01-21T08:53:14.903 回答
0

请在DJI 开发者用户中心申请 App Key 时查看识别码,应该是com.dji.sdk.sample。更多信息,请查看DJI Android SDK Github Page,您可以按照那里的指南进行操作。希望这有帮助!

于 2016-01-19T13:15:46.783 回答