OpenCV Android SDK load failed: libc++_shared.so not found

asked 2019-12-01 09:35:28 -0500

rtrahms gravatar image

OpenCV 4.1.2 Android SDK Java SE 1.8 Android Studio 3.5.2 Samsung Galaxy S8 (Arm8)

I am building an OpenCV Android app, and the app builds and runs without issue using OpenCV 3.4.7 Android SDK. Upon upgrade to OpenCV 4.1.2, app builds but crashes upon attempt to load the opencv_java4 library with the stacktrace below. It is looking for a c++ shared library, but I don't see one available in the released SDK:

D/OpenCV/StaticHelper: Library list: "" D/OpenCV/StaticHelper: First attempt to load libs D/OpenCV/StaticHelper: Trying to init OpenCV libs D/OpenCV/StaticHelper: Trying to load library opencv_java4 D/OpenCV/StaticHelper: Cannot load library "opencv_java4" W/System.err: java.lang.UnsatisfiedLinkError: dlopen failed: library "libc++_shared.so" not found W/System.err: at java.lang.Runtime.loadLibrary0(Runtime.java:1016) W/System.err: at java.lang.System.loadLibrary(System.java:1669) W/System.err: at org.opencv.android.StaticHelper.loadLibrary(StaticHelper.java:64) W/System.err: at org.opencv.android.StaticHelper.initOpenCVLibs(StaticHelper.java:95) W/System.err: at org.opencv.android.StaticHelper.initOpenCV(StaticHelper.java:39) W/System.err: at org.opencv.android.OpenCVLoader.initDebug(OpenCVLoader.java:107) W/System.err: at com.example.yolo_detector2.MainActivity.onResume(MainActivity.java:249) W/System.err: at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1412) W/System.err: at android.app.Activity.performResume(Activity.java:7558) W/System.err: at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4008) W/System.err: at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4048) W/System.err: at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:51) W/System.err: at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:145) W/System.err: at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:70) W/System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1950) W/System.err: at android.os.Handler.dispatchMessage(Handler.java:106) W/System.err: at android.os.Looper.loop(Looper.java:214) W/System.err: at android.app.ActivityThread.main(ActivityThread.java:7073) W/System.err: at java.lang.reflect.Method.invoke(Native Method) W/System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:964)

edit retag flag offensive close merge delete

Comments

Does this help libc++_shared.so

supra56 gravatar imagesupra56 ( 2019-12-01 20:07:08 -0500 )edit