Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could Not init the opencv library on an older android device via OpenCVLoader.InitLocal() #3

Open
Th3L0x opened this issue Jul 23, 2024 · 4 comments

Comments

@Th3L0x
Copy link

Th3L0x commented Jul 23, 2024

Works on Samsung A23 Android 13 API 33
Works on IPhone 8 IOS 16.7.8
Throws error on OpenCVLoader.InitLocal() -> Samsung A600 Android 10 API 29

[OpenCV] First attempt to load libs
[OpenCV] Trying to load library opencv_java4
[OpenCV] Cannot load library "opencv_java4"
[System.err] java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.Agitur.DeepDate-kmVeKUJIxyCX1Bv1WvRgFg==/base.apk"],nativeLibraryDirectories=[/data/app/com.Agitur.DeepDate-kmVeKUJIxyCX1Bv1WvRgFg==/lib/arm, /data/app/com.Agitur.DeepDate-kmVeKUJIxyCX1Bv1WvRgFg==/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]]] couldn't find "libopencv_java4.so"
[System.err] at java.lang.Runtime.loadLibrary0(Runtime.java:1067)
[System.err] at java.lang.Runtime.loadLibrary0(Runtime.java:1007)
[System.err] at java.lang.System.loadLibrary(System.java:1667)
[System.err] at org.opencv.android.StaticHelper.loadLibrary(StaticHelper.java:44)
[System.err] at org.opencv.android.StaticHelper.initOpenCV(StaticHelper.java:19)
[System.err] at org.opencv.android.OpenCVLoader.initLocal(OpenCVLoader.java:31)
[System.err] at crc64e7695c7027088956.MainActivity.n_onCreate(Native Method)
[System.err] at crc64e7695c7027088956.MainActivity.onCreate(MainActivity.java:42)
[System.err] at android.app.Activity.performCreate(Activity.java:7955)
[System.err] at android.app.Activity.performCreate(Activity.java:7944)
[System.err] at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1307)
[System.err] at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3531)
[System.err] at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3703)
[System.err] at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
[System.err] at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
[System.err] at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
[System.err] at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2216)
[System.err] at android.os.Handler.dispatchMessage(Handler.java:107)
[System.err] at android.os.Looper.loop(Looper.java:237)
[System.err] at android.app.ActivityThread.main(ActivityThread.java:7948)
[System.err] at java.lang.reflect.Method.invoke(Native Method)
[System.err] at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
[System.err] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1075)
[OpenCV] First attempt to load libs fails

@Th3L0x
Copy link
Author

Th3L0x commented Jul 23, 2024

Here is an article that could be helpful: https://programmersought.com/article/46338475748/

@Th3L0x Th3L0x mentioned this issue Jul 24, 2024
@Th3L0x
Copy link
Author

Th3L0x commented Jul 24, 2024

Created PR for this issue #4

@v-hogood
Copy link
Owner

I don't think it's worth supporting 32-bit Android anymore. But if you think otherwise feel free to re-open :-)

@v-hogood v-hogood reopened this Jan 20, 2025
@v-hogood
Copy link
Owner

I added 32-bit support (x86 and armeabi-v7a) to OpenCV.Android 4.11.0 let me know if it works for you thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants