无法运行ImportSDKDemo,无法加载ffmepg

时间:2018-12-10 13:57:06

标签: dji-sdk

我无法运行ImportSDKDemo,无法加载ffmepg。

您好,无论我使用的是什么版本的sdk(24、26、28),我都无法运行此演示。

我已经安装了ffmpeg

`E/sdk: v19 install
V/sdk: DexInstall end
I/InstantRun: starting instant run server: is main process
I/art: Starting a blocking GC Instrumentation
W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
D/: HostConnection::get() New Host Connection established 0xe4248970, tid 2143
D/libEGL: Emulator has host GPU support, qemu.gles is set to 1.
E/libEGL: load_driver(/system/lib/egl/libGLES_emulation.so): dlopen failed: library "/system/lib/egl/libGLES_emulation.so" not found
D/libEGL: loaded /system/lib/egl/libEGL_emulation.so
D/libEGL: loaded /system/lib/egl/libGLESv1_CM_emulation.so
D/libEGL: loaded /system/lib/egl/libGLESv2_emulation.so
D/: HostConnection::get() New Host Connection established 0xe4248b20, tid 2165
I/OpenGLRenderer: Initialized EGL, version 1.4
D/OpenGLRenderer: Swap behavior 1
W/art: Before Android 4.1, method int android.support.v7.widget.ListViewCompat.lookForSelectablePosition(int, boolean) would have incorrectly overridden the package-private method in android.widget.ListView
E/linker: /data/app/com.dji.importSDKDemo-1/lib/x86/libffmpeg.so: has text relocations
W/System.err: java.lang.UnsatisfiedLinkError: dlopen failed: /data/app/com.dji.importSDKDemo-1/lib/x86/libffmpeg.so: has text relocations
W/System.err:     at java.lang.Runtime.loadLibrary0(Runtime.java:977)
        at java.lang.System.loadLibrary(System.java:1530)
        at dji.midware.natives.SDKRelativeJNI.<clinit>(Unknown Source)
        at dji.midware.natives.SDKRelativeJNI.native_getXXXX(Native Method)
        at com.dji.g.a.a.c.b(Unknown Source)
        at dji.midware.d.b(Unknown Source)
        at dji.sdk.sdkmanager.DJISDKManager.<clinit>(Unknown Source)
W/System.err:     at dji.sdk.sdkmanager.DJISDKManager.getInstance(Unknown Source)
        at com.dji.importSDKDemo.MainActivity$1.run(MainActivity.java:122)
        at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:243)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
        at java.lang.Thread.run(Thread.java:761)
D/SDKRelativeJNI: Couldn't load lib
E/art: 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)
E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #1
    Process: com.dji.importSDKDemo, PID: 2143
    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.c.b(Unknown Source)
        at dji.midware.d.b(Unknown Source)
        at dji.sdk.sdkmanager.DJISDKManager.<clinit>(Unknown Source)
        at dji.sdk.sdkmanager.DJISDKManager.getInstance(Unknown Source)
        at com.dji.importSDKDemo.MainActivity$1.run(MainActivity.java:122)
        at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:243)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
        at java.lang.Thread.run(Thread.java:761)`

请帮助

谢谢

2 个答案:

答案 0 :(得分:0)

Android ImportSDKDemo与本教程相关:https://developer.dji.com/mobile-sdk/documentation/application-development-workflow/workflow-integrate.html#android-studio-project-integration,您可以按照它学习如何导入Android SDK。

如果只想运行该演示,只需从Github下载整个项目:https://github.com/DJI-Mobile-SDK-Tutorials/Android-ImportAndActivateSDKInAndroidStudio,并替换为AndroidManifest.xml文件中应用的App键即可直接运行它。无需安装ffmpeg。它对我有效。

答案 1 :(得分:0)

感谢您的帮助和时间。但是我需要自己构建它,因为我想扩展它以向Spark发布虚拟操纵杆命令。

或者您是否可以建议一个更好的示例来扩展虚拟游戏杆命令?

谢谢!