Please help to me convert py to apk

107 views
Skip to first unread message

Nhân Vũ Trọng

unread,
May 20, 2023, 3:00:45 AM5/20/23
to Kivy users support
I use google colab to convert py to apk.
Please direct me to the appropriate buildozer.spec file.
I convert successfully but when running on android device completely crash
I have attached the python file below
main.py

Nhân Vũ Trọng

unread,
May 20, 2023, 3:32:54 AM5/20/23
to Kivy users support
Tôi debug thì phát hiện lỗi này
05-20 14:21:16.920 29498 29532 I python  :  Traceback (most recent call last):
05-20 14:21:16.920 29498 29532 I python  :    File "/content/.buildozer/android/app/main.py", line 8, in <module>
05-20 14:21:16.920 29498 29532 I python  :    File "/content/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/myapp/arm64-v8a/cv2/__init__.py", line 181, in <module>
05-20 14:21:16.920 29498 29532 I python  :    File "/content/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/myapp/arm64-v8a/cv2/__init__.py", line 111, in bootstrap
05-20 14:21:16.920 29498 29532 I python  :    File "/content/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/myapp/arm64-v8a/cv2/__init__.py", line 109, in load_first_config
05-20 14:21:16.920 29498 29532 I python  :  ImportError: OpenCV loader: missing configuration file: ['config.py']. Check OpenCV installation.
05-20 14:21:16.921 29498 29532 I python  : Python for android ended.

Vào lúc 14:00:45 UTC+7 ngày Thứ Bảy, 20 tháng 5, 2023, Nhân Vũ Trọng đã viết:

Charles longwe

unread,
May 20, 2023, 3:38:09 AM5/20/23
to kivy-...@googlegroups.com
05-20 14:21:16.920 29498 29532 I python  :  ImportError: OpenCV loader: missing configuration file: ['config.py']. Check OpenCV installation.
that is ur error the odule cv2cv is not added in the requirements  buildozer.spec

--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/7b2b558b-26e6-4b52-b67e-e2c98539c9f3n%40googlegroups.com.

Charles longwe

unread,
May 20, 2023, 3:38:48 AM5/20/23
to kivy-...@googlegroups.com
i mean the module opencv......share it here

Charles longwe

unread,
May 20, 2023, 3:40:02 AM5/20/23
to kivy-...@googlegroups.com
the buildozer.spec

Charles longwe

unread,
May 20, 2023, 3:42:58 AM5/20/23
to kivy-...@googlegroups.com
just include opencv module in requirements


On Sat, May 20, 2023 at 9:32 AM Nhân Vũ Trọng <khotruye...@gmail.com> wrote:
--

Nhân Vũ Trọng

unread,
May 20, 2023, 3:47:01 AM5/20/23
to Kivy users support
I made sure to include opencv already

Vào lúc 14:42:58 UTC+7 ngày Thứ Bảy, 20 tháng 5, 2023, longwec...@gmail.com đã viết:

Nhân Vũ Trọng

unread,
May 20, 2023, 5:16:08 AM5/20/23
to Kivy users support
05-20 16:14:57.682 25823 25860 I python  : Android kivy bootstrap done. __name__ is __main__
05-20 16:14:57.684 25823 25860 I python  : AND: Ran string
05-20 16:14:57.684 25823 25860 I python  : Run user program, change dir and execute entrypoint
05-20 16:14:57.757 25823 25860 I python  : [INFO   ] [Logger      ] Record log in /data/user/95/org.test.myapp/files/app/.kivy/logs/kivy_23-05-20_4.txt
05-20 16:14:57.758 25823 25860 I python  : [INFO   ] [Kivy        ] v2.1.0
05-20 16:14:57.758 25823 25860 I python  : [INFO   ] [Kivy        ] Installed at "/data/user/95/org.test.myapp/files/app/_python_bundle/site-packages/kivy/__init__.pyc"
05-20 16:14:57.758 25823 25860 I python  : [INFO   ] [Python      ] v3.9.9 (main, May 20 2023, 07:59:50)
05-20 16:14:57.758 25823 25860 I python  : [Clang 14.0.6 (https://android.googlesource.com/toolchain/llvm-project 4c603efb
05-20 16:14:57.758 25823 25860 I python  : [INFO   ] [Python      ] Interpreter at ""
05-20 16:14:57.758 25823 25860 I python  : [INFO   ] [Logger      ] Purge log fired. Processing...
05-20 16:14:57.759 25823 25860 I python  : [INFO   ] [Logger      ] Purge finished!
05-20 16:14:58.069 25823 25860 I python  : [INFO   ] [Factory     ] 189 symbols loaded
05-20 16:14:58.181 25823 25860 I python  : [INFO   ] [Image       ] Providers: img_tex, img_dds, img_sdl2, img_pil (img_ffpyplayer ignored)
05-20 16:14:58.192 25823 25860 I python  : [INFO   ] [Text        ] Provider: sdl2
05-20 16:14:58.204 25823 25860 I python  : [INFO   ] [Window      ] Provider: sdl2
05-20 16:14:58.218 25823 25860 I python  : [INFO   ] [GL          ] Using the "OpenGL ES 2" graphics system
05-20 16:14:58.221 25823 25860 I python  : [INFO   ] [GL          ] Backend used <sdl2>
05-20 16:14:58.221 25823 25860 I python  : [INFO   ] [GL          ] OpenGL version <b'OpenGL ES 3.2 V@0502.0 (GIT@193b2ee, I593c16c433, 1633593732) (Date:10/07/21)'>
05-20 16:14:58.221 25823 25860 I python  : [INFO   ] [GL          ] OpenGL vendor <b'Qualcomm'>
05-20 16:14:58.222 25823 25860 I python  : [INFO   ] [GL          ] OpenGL renderer <b'Adreno (TM) 650'>
05-20 16:14:58.222 25823 25860 I python  : [INFO   ] [GL          ] OpenGL parsed version: 3, 2
05-20 16:14:58.222 25823 25860 I python  : [INFO   ] [GL          ] Texture max size <16384>
05-20 16:14:58.222 25823 25860 I python  : [INFO   ] [GL          ] Texture max units <16>
05-20 16:14:58.235 25823 25860 I python  : [INFO   ] [Window      ] auto add sdl2 input provider
05-20 16:14:58.235 25823 25860 I python  : [INFO   ] [Window      ] virtual keyboard not allowed, single mode, not docked
05-20 16:14:58.239 25823 25860 I python  :  Traceback (most recent call last):
05-20 16:14:58.240 25823 25860 I python  :    File "/content/.buildozer/android/app/main.py", line 9, in <module>
05-20 16:14:58.240 25823 25860 I python  :    File "/content/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/myapp/arm64-v8a/av/__init__.py", line 20, in <module>
05-20 16:14:58.240 25823 25860 I python  :  ImportError: dlopen failed: "/data/user/95/org.test.myapp/files/app/_python_bundle/site-packages/av/_core.so" is for EM_X86_64 (62) instead of EM_AARCH64 (183)
05-20 16:14:58.240 25823 25860 I python  : Python for android ended.

Vào lúc 14:47:01 UTC+7 ngày Thứ Bảy, 20 tháng 5, 2023, Nhân Vũ Trọng đã viết:

Robert

unread,
May 20, 2023, 12:22:11 PM5/20/23
to Kivy users support

Nhân Vũ Trọng

unread,
May 20, 2023, 9:54:22 PM5/20/23
to Kivy users support
Thanks sir.

Vào lúc 23:22:11 UTC+7 ngày Thứ Bảy, 20 tháng 5, 2023, Robert đã viết:
Reply all
Reply to author
Forward
0 new messages