DJI MSDK (version 5.7.1) compatibility with OpenCV. ERROR No implementation found for int djimrtc.natives.MRTCController.initNativeMRTCCore(java.lang.String)
CompletedError occur when implementing opencv, there are 2 files found with same path
'lib/arm64-v8a/libc++_shared.so'
'lib/armeabi-v7a/libc++_shared.so'
and using in gradle
packagingOptions {
pickFirst 'lib/arm64-v8a/libc++_shared.so'
pickFirst 'lib/armeabi-v7a/libc++_shared.so'
pickFirst 'lib/armeabi-v7a/libc++_shared.so'
}
leading app crashing after 5-7 seconds (probably because of cant reach compatible jetified-dji-sdk-v5-aircraft-5.7.1\jni\arm64-v8a\libc++_shared.so , because it took opencv .so files).
2023-12-05 12:17:55.776 17770-17770 MRTCController com.dbox.dcm_v5 E Couldn't load lib
2023-12-05 12:17:55.777 17770-17770 com.dbox.dcm_v com.dbox.dcm_v5 E No implementation found for int djimrtc.natives.MRTCController.initNativeMRTCCore(java.lang.String) (tried Java_djimrtc_natives_MRTCController_initNativeMRTCCore and Java_djimrtc_natives_MRTCController_initNativeMRTCCore__Ljava_lang_String_2)
--------- beginning of crash
2023-12-05 12:17:55.777 17770-17770 AndroidRuntime com.dbox.dcm_v5 D Shutting down VM
2023-12-05 12:17:55.777 17770-17770 AndroidRuntime com.dbox.dcm_v5 E FATAL EXCEPTION: main
Process: com.dbox.dcm_v5, PID: 17770
java.lang.UnsatisfiedLinkError: No implementation found for int djimrtc.natives.MRTCController.initNativeMRTCCore(java.lang.String) (tried Java_djimrtc_natives_MRTCController_initNativeMRTCCore and Java_djimrtc_natives_MRTCController_initNativeMRTCCore__Ljava_lang_String_2)
at djimrtc.natives.MRTCController.initNativeMRTCCore(Native Method)
at djimrtc.natives.MRTCController.initNativeCoreMRTC(MRTCController.java:1)
at co_a.co_i.<init>(MRTCEngine.java:15)
at co_a.co_i.co_a(MRTCEngine.java:3)
at dji.v5.inner.video.stream.co_a.co_a(MRTCManager.java:1)
at dji.v5.inner.video.stream.co_a.<init>(MRTCManager.java:24)
at dji.v5.inner.video.stream.co_a.<init>(MRTCManager.java:1)
at dji.v5.inner.video.stream.co_a$co_c.<clinit>(MRTCManager.java:1)
at dji.v5.inner.video.stream.co_a$co_c.co_a(MRTCManager.java:1)
at dji.v5.inner.video.stream.co_a.co_c(MRTCManager.java:1)
at dji.v5.manager.datacenter.livestream.LiveStreamManager.startStream(LiveStreamManager.java:15)
at com.dbox.dcm_v5.VideoManager$surfaceViewHolderCallback1$1.surfaceCreated$lambda$0(VideoManager.kt:71)
at com.dbox.dcm_v5.VideoManager$surfaceViewHolderCallback1$1.$r8$lambda$lpkFD5zdGpBfIOrg5gRSvCeO_eo(Unknown Source:0)
at com.dbox.dcm_v5.VideoManager$surfaceViewHolderCallback1$1$$ExternalSyntheticLambda0.run(Unknown Source:2)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7400)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:935)
2023-12-05 12:17:55.779 17770-17770 DJIV5/Class@b89d640 com.dbox.dcm_v5 E (co_b:42) Stream closed
2023-12-05 12:17:55.785 17770-17770 DJIV5/Class@b89d640 com.dbox.dcm_v5 E (co_c:40) build
2023-12-05 12:17:55.786 17770-17770 DJIV5/SDKConfig com.dbox.dcm_v5 E (getPackageProductCategory:10) dji.v5.handheld.BuildConfig
Any suggestion how to solve this problem? as i understand both are necessary. How i can find compatibility?
-
I'm using OpenCV 4.8.0 . I tried with msdk 5.5.0 as you said, still same error.
2023-12-05 12:17:55.776 17770-17770 MRTCController com.dbox.dcm_v5 E Couldn't load lib
2023-12-05 12:17:55.777 17770-17770 com.dbox.dcm_v com.dbox.dcm_v5 E No implementation found for int djimrtc.natives.MRTCController.initNativeMRTCCore(java.lang.String) (tried Java_djimrtc_natives_MRTCController_initNativeMRTCCore and Java_djimrtc_natives_MRTCController_initNativeMRTCCore__Ljava_lang_String_2)
--------- beginning of crash
2023-12-05 12:17:55.777 17770-17770 AndroidRuntime com.dbox.dcm_v5 D Shutting down VM
2023-12-05 12:17:55.777 17770-17770 AndroidRuntime com.dbox.dcm_v5 E FATAL EXCEPTION: main
Process: com.dbox.dcm_v5, PID: 17770
java.lang.UnsatisfiedLinkError: No implementation found for int djimrtc.natives.MRTCController.initNativeMRTCCore(java.lang.String) (tried Java_djimrtc_natives_MRTCController_initNativeMRTCCore and Java_djimrtc_natives_MRTCController_initNativeMRTCCore__Ljava_lang_String_2)
at djimrtc.natives.MRTCController.initNativeMRTCCore(Native Method)
at djimrtc.natives.MRTCController.initNativeCoreMRTC(MRTCController.java:1)
at co_a.co_i.<init>(MRTCEngine.java:15)
at co_a.co_i.co_a(MRTCEngine.java:3)
at dji.v5.inner.video.stream.co_a.co_a(MRTCManager.java:1)
at dji.v5.inner.video.stream.co_a.<init>(MRTCManager.java:24)
at dji.v5.inner.video.stream.co_a.<init>(MRTCManager.java:1)
at dji.v5.inner.video.stream.co_a$co_c.<clinit>(MRTCManager.java:1)
at dji.v5.inner.video.stream.co_a$co_c.co_a(MRTCManager.java:1)
at dji.v5.inner.video.stream.co_a.co_c(MRTCManager.java:1)
at dji.v5.manager.datacenter.livestream.LiveStreamManager.startStream(LiveStreamManager.java:15)
at com.dbox.dcm_v5.VideoManager$surfaceViewHolderCallback1$1.surfaceCreated$lambda$0(VideoManager.kt:71)
at com.dbox.dcm_v5.VideoManager$surfaceViewHolderCallback1$1.$r8$lambda$lpkFD5zdGpBfIOrg5gRSvCeO_eo(Unknown Source:0)
at com.dbox.dcm_v5.VideoManager$surfaceViewHolderCallback1$1$$ExternalSyntheticLambda0.run(Unknown Source:2)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7400)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:935)
2023-12-05 12:17:55.779 17770-17770 DJIV5/Class@b89d640 com.dbox.dcm_v5 E (co_b:42) Stream closed
2023-12-05 12:17:55.785 17770-17770 DJIV5/Class@b89d640 com.dbox.dcm_v5 E (co_c:40) build
2023-12-05 12:17:55.786 17770-17770 DJIV5/SDKConfig com.dbox.dcm_v5 E (getPackageProductCategory:10) dji.v5.handheld.BuildConfig
Can you show your app build.gradle file? -
Did you do something with RTMP functionality provided by dji sdk, because that's when the crash happens!
for example
liveStreamManager.startStream(object : CommonCallbacks.CompletionCallback {
override fun onSuccess() {
Log.d(TAG, "startStream(): RTMP stream started.")
Log.d(TAG, liveStreamManager.isStreaming.toString())
}
override fun onFailure(error: IDJIError) {
Log.e(TAG, "startStream(): ${error.errorCode()} ${error.description()}")
}
})
Please sign in to leave a comment.
Comments
6 comments