Closed chavarinbonbyn closed 4 years ago
You do need to have the requests
module in your buildozer.spec
requirements, then buildozer android clean
and build again from scratch.
We have few apps using it and it's working OK as long as it's working OK.
For further support come ask on https://chat.kivy.org
Unfortunately does not work, I did what you suggested:
Add the requirement to buildozer.spec
buildozer android clean
rm -rf ./buildozer
buildozer android debug deploy run logcat
But it failed again:
07-15 12:17:19.419 18345 18691 I python : [INFO ] [Base ] Leaving application in progress...
07-15 12:17:19.419 18345 18691 I python : Traceback (most recent call last):
07-15 12:17:19.420 18345 18691 I python : File "/home/chava/PycharmProjects/MyProject/.buildozer/android/app/main.py", line 45, in <module>
07-15 12:17:19.421 18345 18691 I python : File "/home/chava/PycharmProjects/MyProject/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/myapp/kivy/app.py", line 855, in run
07-15 12:17:19.422 18345 18691 I python : File "/home/chava/PycharmProjects/MyProject/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/myapp/kivy/base.py", line 504, in runTouchApp
07-15 12:17:19.423 18345 18691 I python : File "/home/chava/PycharmProjects/MyProject/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/myapp/kivy/core/window/window_sdl2.py", line 747, in mainloop
07-15 12:17:19.424 18345 18691 I python : File "/home/chava/PycharmProjects/MyProject/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/myapp/kivy/core/window/window_sdl2.py", line 479, in _mainloop
07-15 12:17:19.425 18345 18691 I python : File "/home/chava/PycharmProjects/MyProject/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/myapp/kivy/base.py", line 342, in idle
07-15 12:17:19.426 18345 18691 I python : File "/home/chava/PycharmProjects/MyProject/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/myapp/kivy/base.py", line 327, in dispatch_input
07-15 12:17:19.428 18345 18691 I python : File "/home/chava/PycharmProjects/MyProject/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/myapp/kivy/base.py", line 233, in post_dispatch_input
07-15 12:17:19.430 18345 18691 I python : File "kivy/_event.pyx", line 707, in kivy._event.EventDispatcher.dispatch
07-15 12:17:19.431 18345 18691 I python : File "/home/chava/PycharmProjects/MyProject/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/myapp/kivy/core/window/__init__.py", line 1402, in on_motion
07-15 12:17:19.432 18345 18691 I python : File "kivy/_event.pyx", line 707, in kivy._event.EventDispatcher.dispatch
07-15 12:17:19.433 18345 18691 I python : File "/home/chava/PycharmProjects/MyProject/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/myapp/kivy/core/window/__init__.py", line 1418, in on_touch_down
07-15 12:17:19.434 18345 18691 I python : File "kivy/_event.pyx", line 707, in kivy._event.EventDispatcher.dispatch
07-15 12:17:19.435 18345 18691 I python : File "/home/chava/PycharmProjects/MyProject/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/myapp/kivy/uix/screenmanager.py", line 1191, in on_touch_down
07-15 12:17:19.436 18345 18691 I python : File "/home/chava/PycharmProjects/MyProject/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/myapp/kivy/uix/widget.py", line 549, in on_touch_down
07-15 12:17:19.438 18345 18691 I python : File "kivy/_event.pyx", line 707, in kivy._event.EventDispatcher.dispatch
07-15 12:17:19.439 18345 18691 I python : File "/home/chava/PycharmProjects/MyProject/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/myapp/kivy/uix/relativelayout.py", line 288, in on_touch_down
07-15 12:17:19.440 18345 18691 I python : File "/home/chava/PycharmProjects/MyProject/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/myapp/kivy/uix/widget.py", line 549, in on_touch_down
07-15 12:17:19.441 18345 18691 I python : File "kivy/_event.pyx", line 707, in kivy._event.EventDispatcher.dispatch
07-15 12:17:19.442 18345 18691 I python : File "/home/chava/PycharmProjects/MyProject/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/myapp/kivy/uix/widget.py", line 549, in on_touch_down
07-15 12:17:19.443 18345 18691 I python : File "kivy/_event.pyx", line 707, in kivy._event.EventDispatcher.dispatch
07-15 12:17:19.444 18345 18691 I python : File "/home/chava/PycharmProjects/MyProject/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/myapp/kivy/uix/behaviors/button.py", line 151, in on_touch_down
07-15 12:17:19.445 18345 18691 I python : File "kivy/_event.pyx", line 703, in kivy._event.EventDispatcher.dispatch
07-15 12:17:19.446 18345 18691 I python : File "kivy/_event.pyx", line 1214, in kivy._event.EventObservers.dispatch
07-15 12:17:19.448 18345 18691 I python : File "kivy/_event.pyx", line 1098, in kivy._event.EventObservers._dispatch
07-15 12:17:19.449 18345 18691 I python : File "/home/chava/PycharmProjects/MyProject/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/myapp/kivy/lang/builder.py", line 64, in custom_callback
07-15 12:17:19.450 18345 18691 I python : File "/data/data/org.web.services.myapp/files/app/view/welcome.kv", line 32, in <module>
07-15 12:17:19.451 18345 18691 I python : import requests
07-15 12:17:19.452 18345 18691 I python : File "/home/chava/PycharmProjects/MyProject/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/myapp/requests/__init__.py", line 43, in <module>
07-15 12:17:19.453 18345 18691 I python : ModuleNotFoundError: No module named 'urllib3'
07-15 12:17:19.453 18345 18691 I python : Python for android ended.
If then you add urllib3 to the requirements, then it fails with another dependency. And so on.
I believe this issue should be reopen.
I have resolve this with :
requirements = python3,requests,urllib3,charset_normalizer,idna,kivy
Versions
Description
Try to use requests module in my App. The request module works like a charm I'm my lap top. Only when I use buildozer and pass it to my phone the app breaks.
This module (requests) comes within python standard library (such as sqlite3), thus must not go in the requirements section of the buildozer.spec file (Nevertheless I have tried that but still fails; ModuleNotFoundError: No module named 'urllib3', and so on..)
buildozer.spec
Command:
Spec file:
Logs