Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link for Android NDK is broken, ValueError: read of closed file - android-ndk-r25b-linux-x86_64.zip #1618

Closed
damascene opened this issue Jun 15, 2023 · 3 comments

Comments

@damascene
Copy link
Contributor

image

Versions

  • Python:
  • OS: `buildozer latest 31bac91f0bcc 8 days ago 1.2GB
  • Buildozer:

Description

I'm trying to use Docker version of Buildozer but the link for Android NDK seems broken 404.

https://dl.google.com/android/repository/android-ndk-r25b-linux-x86_64.zip

buildozer.spec

Command:

docker run -v /home/my_user/buildozer_cache/:/home/user/.buildozer -v $(pwd):/home/user/hostcwd kivy/buildozer android debug

Spec file:

[app]
title = Test App
package.name = test_app
package.domain = com.gitlab.uak
source.dir = .
source.include_exts = py,png,jpg,kv,atlas,ttf,mo,atlas
source.include_patterns = data/*
version.regex = __version__ = ['"](.*)['"]
version.filename = %(source.dir)s/main.py
requirements =  python3, kivy
icon.filename = %(source.dir)s/data/icon.png
orientation = portrait
osx.python_version = 3
osx.kivy_version = 1.9.1
fullscreen = 0
android.api = 33
android.skip_update = False
android.accept_sdk_license = True
android.archs = arm64-v8a, armeabi-v7a
android.allow_backup = True
ios.kivy_ios_url = https://github.com/kivy/kivy-ios
ios.kivy_ios_branch = master
ios.ios_deploy_url = https://github.com/phonegap/ios-deploy
ios.ios_deploy_branch = 1.10.0
ios.codesign.allowed = false
[buildozer]
log_level = 2
warn_on_root = 1

Logs

# Run '/usr/bin/python3 -m pip install -q --user \'appdirs\' \'colorama>=0.3.3\' \'jinja2\' \'sh>=1.10, <2.0; sys_platform!="nt"\' \'build\' \'toml\' \'packaging\''
# Cwd None
WARNING: You are using pip version 21.1.1; however, version 23.1.2 is available.
You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command.
# Apache ANT found at /home/user/.buildozer/android/platform/apache-ant-1.9.4
# Android SDK found at /home/user/.buildozer/android/platform/android-sdk
# Recommended android's NDK version by p4a is: 25b
# Android NDK is missing, downloading
# Downloading https://dl.google.com/android/repository/android-ndk-r25b-linux-x86_64.zip
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 1020, in run_command
    self.target.run_commands(args)
  File "/home/user/.local/lib/python3.8/site-packages/buildozer/target.py", line 92, in run_commands
    func(args)
  File "/home/user/.local/lib/python3.8/site-packages/buildozer/target.py", line 102, in cmd_debug
    self.buildozer.prepare_for_build()
  File "/home/user/.local/lib/python3.8/site-packages/buildozer/__init__.py", line 170, in prepare_for_build
    self.target.install_platform()
  File "/home/user/.local/lib/python3.8/site-packages/buildozer/targets/android.py", line 670, in install_platform
    self._install_android_ndk()
  File "/home/user/.local/lib/python3.8/site-packages/buildozer/targets/android.py", line 460, in _install_android_ndk
    self.buildozer.download(url,
  File "/home/user/.local/lib/python3.8/site-packages/buildozer/__init__.py", line 654, in download
    urlretrieve(url, filename, report_hook)
  File "/usr/lib/python3.8/urllib/request.py", line 1851, in retrieve
    block = fp.read(bs)
  File "/usr/lib/python3.8/tempfile.py", line 613, in func_wrapper
    return func(*args, **kwargs)
ValueError: read of closed file
@damascene
Copy link
Contributor Author

Maybe related to this line:

archive = 'android-ndk-r{0}-' + _platform + '{1}.' + ext

Seems Android changed link format?

https://dl.google.com/android/repository/android-ndk-r25b-linux-x86_64.zip 
https://dl.google.com/android/repository/android-ndk-r25b-linux.zip

@misl6
Copy link
Member

misl6 commented Jun 15, 2023

Hi @damascene !

This issue has been fixed via #1427

buildozer docker image which was available on dockerhub is unmaintained, and usage is currently discouraged.

@Creating-Code-CC
Copy link

I get the same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants