MediaManagerDemo 编译有问题 NDK was located by using ndk.dir ...
CompletedMediaManagerDemo
编译有问题 NDK was located by using ndk.dir property. This method is deprecated and will be removed in a future release. Please delete ndk.dir from local.properties and set android.ndkVersion to [20.0.5594570] in all native modules in the project. https://developer.android.com/r/studio-ui/ndk-dir
/Users/apple/Documents/Android/android-sdk/ndk/20.0.5594570/toolchains/llvm/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-strip: /Users/apple/Downloads/Android-MediaManagerDemo-master/MediaManagerDemo/app/build/intermediates/stripped_native_libs/debug/out/lib/armeabi-v7a/libDJISDKLOGJNI.so: warning: allocated section `' not in segment
/Users/apple/Documents/Android/android-sdk/ndk/20.0.5594570/toolchains/llvm/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-strip: /Users/apple/Downloads/Android-MediaManagerDemo-master/MediaManagerDemo/app/build/intermediates/stripped_native_libs/debug/out/lib/armeabi-v7a/libDJIWaypointV2Core.so: warning: allocated section `' not in segment
运行报错: Process: com.dji.mediaManagerDemo, PID: 14111
java.lang.UnsatisfiedLinkError: dlopen failed: "/data/app/com.dji.mediaManagerDemo-dcw9MwZa_SIs-iXgx47e2A==/lib/arm64/libDJISDKLOGJNI.so" .dynamic section has invalid offset: 0x41120, expected to match PT_DYNAMIC offset: 0x0
at java.lang.Runtime.loadLibrary0(Runtime.java:1071)
at java.lang.Runtime.loadLibrary0(Runtime.java:1007)
at java.lang.System.loadLibrary(System.java:1668)
at dji.log.DJISDKLogEngine.(Unknown Source:6)
at dji.log.DJISDKLogEngine.getInstance(Unknown Source:0)
at dji.log.DJILogFileManager.init(Unknown Source:54)
at dji.log.DJILogHelper.initManagers(Unknown Source:7)
at dji.log.DJILogHelper.initLogHelper(Unknown Source:10)
at dji.log.DJILogHelper.init(Unknown Source:47)
at dji.log.DJILog.init(Unknown Source:9)
at dji.sdk.sdkmanager.DJISDKManager.initLog(Unknown Source:49)
at dji.sdk.sdkmanager.DJISDKManager.registerApp(Unknown Source:10)
at com.dji.mediaManagerDemo.DemoApplication.onCreate(:194)
at com.dji.mediaManagerDemo.MApplication.onCreate(:24)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1202)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7351)
-
你是MediaManagerDemo里面有包含NDK的库吗?其实是不需要的。另外,下载好这个demo,只需要更改appkey就行或者更新下gradle和android build tool,其他不要更改。 ![](https://djisdksupport.zendesk.com/attachments/token/MvfcGJcMA0o26MVq6i41vj6wr/?name=inline1543867185.png)
Please sign in to leave a comment.
Comments
1 comment