Hello, I would be grateful if someone provided help.
I have built android app in python/kivi/kivimd and used OpenCV library.
Library was correctly (I think) installed and imported into the app, and everything works well on my desktop.
However, when I compile APK and install the app on the phone, app crashes. Logcat records the following issue:
12-12 00:16:56.217 1047 1091 I python : Traceback (most recent call last):
12-12 00:16:56.217 1047 1091 I python : File "/content/.buildozer/android/app/main.py", line 54, in <module>
12-12 00:16:56.218 1047 1091 I python : File "/content/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/kivinova/arm64-v8a/cv2/__init__.py", line 181, in <module>
12-12 00:16:56.219 1047 1091 I python : File "/content/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/kivinova/arm64-v8a/cv2/__init__.py", line 111, in bootstrap
12-12 00:16:56.220 1047 1091 I python : File "/content/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/kivinova/arm64-v8a/cv2/__init__.py", line 109, in load_first_config
12-12 00:16:56.221 1047 1091 I python : ImportError: OpenCV loader: missing configuration file: ['config.py']. Check OpenCV installation.
12-12 00:16:56.221 1047 1091 I python : Python for android ended.
In line 54 of main.py I am importing cv2.
During the development, I was using:
opencv-contrib-python 4.10.0.84
opencv-python 4.10.0.84
opencv-python-headless 4.10.0.84
this is my requirements line in buildozer.spec
requirements = python3,kivy,kivymd,kivy_garden.graph,kivymd_extensions,kivymd-extensions.akivymd,kivy_garden.mapview,plyer,requests,chardet,beautifulsoup4,python-dateutil,pycryptodome,barcode,pillow,numpy,opencv-python, opencv-contrib-python, opencv-python-headless,qrcode,dbr
I am using python 3.9.7
Can someone suggest how I can solve this problem?
Regards and many thanks!