Closed brvier closed 4 years ago
Thanks @brvier for reproducing the bug with docker in master. I'll try to look into it this week
Wheels dependancy seems missing in the Dockerfile too :)
p4a.fork = kivy p4a.branch = release-2020.04.01
Same error using older p4a repository, so probably not related to p4a changes :) EDIT : oups i believe it was YYYY-DD-MM ... so that the newer not the older :)
Hi, I got the same problem, after cloning buildozer repo's I was able to fix by changing the Dockerfile at line 78
As @brvier said, wheel was missing so I add it and I upgrade virtualenv
...
RUN pip3 install --user wheel Cython==0.28.6 ${SRC_DIR}
RUN python3 -m pip install -U pip virtualenv
...
The first one add wheel, the command will failed at the end because of 'bdist_wheel' error The second will apply previous change without failing and will upgrade virtualenv
After building it I was able to create my apk !
Hope it will help you
PS: @AndreMiras Isn't it possible to make tag on Docker hub ? So we could just pull the previous image and use it to compile ? For eg in this case, even if I used a previous commit to build, it still crash because it was a venv dep's problem, so have a "fixed" image may help ?
I also get the same error for python 2.7 (compiling Pillow) Opening another pull request for python2.7
I confirm the workaround.
Hello, I tried using android runtime permissions, as suggested by @AndreMiras, but buildozer logcat still returns the error message:
from virtualenv import main ImportError: cannot import name 'main'
Buildozer.spec : requirements: python3, kivy, pyjnius android.add_aars = support-compat-27.0.0.aar
main.py
from kivy.app import App from kivy.uix.boxlayout import BoxLayout from permissions.location import check_permission, ask_permission
class ExampleRoot(BoxLayout):
def check_fine_location_permission(self):
check_permission("android.permission.ACCESS_FINE_LOCATION")
def request_fine_location_permission(self):
ask_permission("android.permission.ACCESS_FINE_LOCATION")
class ExampleApp(App): def build(self): return ExampleRoot()
if name == 'main': ExampleApp().run()
permissions/location.py
from jnius import autoclass from kivy.logger import Logger
PythonActivity = autoclass("org.kivy.android.PythonActivity").mActivity Context = autoclass('android.content.Context') ContextCompat = autoclass('android.support.v4.content.ContextCompat')
def check_permission(permission, activity=PythonActivity): permission_status = ContextCompat.checkSelfPermission(activity, permission)
Logger.info(permission_status)
permission_granted = 0 == permission_status
Logger.info("Permission Status: {}".format(permission_granted))
return permission_granted
def ask_permission(permission, activity=PythonActivity): PythonActivity.requestPermissions([permission])
Any suggestion to fix this error?
Thanks a lot
Hi @pasteurjr, are you compiling with buildozer's docker image or by your own installation ? If you build with docker please pull the latest image
docker pull kivy/buildozer
Then recreate your buildozer's container If it's your own installation, please update pip and virtual env
pip install --upgrade pip virtualenv
If you have both python3 and python2 installed, be sure to upgrade python3 environment with
python3 -m pip install --upgrade pip virtualenv
Hope this will help you !
Thanks a lot @Sirfanas , it worked for me!
@Sirfanas worked for me as well with Linux subsystem on Windows! Thank you.
Thanks @Sirfanas
Plz help me
Build failed while trying to install python dependancies :
Versions
Description
Logs