Open OlafHaag opened 4 years ago
@tshirtman gave me this working workaround:
First:
sudo chmod -R 777 /tmp
then
docker run \
--rm \
--volume /tmp/.buildozer:/home/user/.buildozer \
--volume $PWD:/home/user/hostcwd \
kivy/buildozer android debug
Works repeatedly. Still downloads gradle each build though. If this is a reliable way to build with docker it should be mentioned in the docs.
You shouldn't need to chmod /tmp though It works because since docker creates the directory if it doesn't exist, and thus it has the right owner
I didn't have a /tmp/.buildozer folder and got a Permission Denied error without the chmod at first try.
docker run --rm --volume /tmp/.buildozer:/home/user/.buildozer --volume $PWD:/home/user/hostcwd kivy/buildozer android release'
# Check configuration tokens
# Ensure build layout
# Create directory /home/user/.buildozer/cache
Traceback (most recent call last):
File "/home/user/.local/bin/buildozer", line 8, in <module>
sys.exit(main())
File "/home/user/.local/lib/python3.8/site-packages/buildozer/scripts/client.py", line 13, in main
Buildozer().run_command(sys.argv[1:])
File "/home/user/.local/lib/python3.8/site-packages/buildozer/__init__.py", line 1003, in run_command
self.set_target(command)
File "/home/user/.local/lib/python3.8/site-packages/buildozer/__init__.py", line 154, in set_target
self.check_build_layout()
File "/home/user/.local/lib/python3.8/site-packages/buildozer/__init__.py", line 446, in check_build_layout
self.mkdir(self.global_cache_dir)
File "/home/user/.local/lib/python3.8/site-packages/buildozer/__init__.py", line 548, in mkdir
makedirs(dn)
File "/usr/lib/python3.8/os.py", line 223, in makedirs
mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/home/user/.buildozer/cache'
Versions
Description
I was trying to build an APK using docker with the commands in the README. The first time went through, but the second time I got an error:
Build failed: Requested API target 28 is not available, install it with the SDK android tool.
Also tried with API target 27. I deleted any .buildozer directories several times over.I'd also expect the README to give hints as how to prevent the docker run command to download the Android SDK & NDK every time it is run. I did not get any support in the discord support channel. Since this is unexpected behaviour resulting in build errors, I open this issue.
buildozer.spec
Command:
Also tried after building the Dockerfile from the buildozer repo:
Spec file:
Logs