I tweaked the requirements in buildozer.spec file many times to compile OpenCV into my app, yet it does not compile into the app. Whenever I launches the app on android it just crashes. I wonder if anyone here has experience in using OpenCV in a kivy android app.
I tried to use opencv and opencv-contrib-python, with armeabi-v7a (32bit), which does not work because opencv can only be compiled as 64-bit binaries (it is a guess)
07-29 13:55:00.222 6562 6639 I python : Traceback (most recent call last):
07-29 13:55:00.222 6562 6639 I python : File "/home/cat/Desktop/kivy_glucose/.buildozer/android/app/main.py", line 8, in <module>
07-29 13:55:00.222 6562 6639 I python : File "/home/cat/Desktop/kivy_glucose/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/kivyglucose/cv2/__init__.py", line 5, in <module>
07-29 13:55:00.222 6562 6639 I python : ImportError: dlopen failed: "/data/data/org.test.kivyglucose/files/app/_python_bundle/site-packages/cv2/cv2.so" is 64-bit instead of 32-bit
07-29 13:55:00.222 6562 6639 I python : Python for android ended.
Then I tried to use opencv and opencv-contrib-python, with arm64-v8a (64bit), which also does not work. It says in the error that it does not expect running on 64-bit. (again, my guess). I am kind of stuck in the middle now.
07-30 09:42:11.991 4748 4820 I python : Traceback (most recent call last):
07-30 09:42:11.991 4748 4820 I python : File "/home/cat/Desktop/kivy_glucose/.buildozer/android/app/main.py", line 8, in <module>
07-30 09:42:11.991 4748 4820 I python : File "/home/cat/Desktop/kivy_glucose/.buildozer/android/platform/build-arm64-v8a/build/python-installs/kivyglucose/cv2/__init__.py", line 5, in <module>
07-30 09:42:11.992 4748 4820 I python : ImportError: dlopen failed: "/data/data/org.test.kivyglucose/files/app/_python_bundle/site-packages/cv2/cv2.so" has unexpected e_machine: 62 (EM_X86_64)
07-30 09:42:11.992 4748 4820 I python : Python for android ended.
Thanks!