Android NDK?

218 views
Skip to first unread message

Frédéric

unread,
Sep 27, 2022, 1:41:17 PM9/27/22
to Kivy users support
Hello,

After a buildozer clean, now Buildozer seems to not be able to update Android NDK.
I have this error
----
# Android SDK found at /home/frederic/.buildozer/android/platform/android-sdk
# Recommended android's NDK version by p4a is: 23b
# Android NDK is missing, downloading
# Downloading https://dl.google.com/android/repository/android-ndk-r23b-linux-x86_64.zip
Traceback (most recent call last):
  File "/home/frederic/.local/bin/buildozer", line 8, in <module>
    sys.exit(main())
  File "/home/frederic/.local/lib/python3.10/site-packages/buildozer/scripts/client.py", line 13, in main
    Buildozer().run_command(sys.argv[1:])
  File "/home/frederic/.local/lib/python3.10/site-packages/buildozer/__init__.py", line 1020, in run_command
    self.target.run_commands(args)
  File "/home/frederic/.local/lib/python3.10/site-packages/buildozer/target.py", line 93, in run_commands
    func(args)
  File "/home/frederic/.local/lib/python3.10/site-packages/buildozer/target.py", line 103, in cmd_debug
    self.buildozer.prepare_for_build()
  File "/home/frederic/.local/lib/python3.10/site-packages/buildozer/__init__.py", line 170, in prepare_for_build
    self.target.install_platform()
  File "/home/frederic/.local/lib/python3.10/site-packages/buildozer/targets/android.py", line 702, in install_platform
    self._install_android_ndk()
  File "/home/frederic/.local/lib/python3.10/site-packages/buildozer/targets/android.py", line 492, in _install_android_ndk
    self.buildozer.download(url,
  File "/home/frederic/.local/lib/python3.10/site-packages/buildozer/__init__.py", line 654, in download
    urlretrieve(url, filename, report_hook)
  File "/usr/lib/python3.10/urllib/request.py", line 1849, in retrieve
    block = fp.read(bs)
  File "/usr/lib/python3.10/tempfile.py", line 622, in func_wrapper
    return func(*args, **kwargs)
ValueError: read of closed file
---
I don't see a r23b version available here

What can I do  to correct this error?

Frederic

Robert

unread,
Sep 27, 2022, 3:59:56 PM9/27/22
to Kivy users support
I renamed ~/.buildozer and it was rebuilt just fine

# Android SDK tools base installation done.

# Recommended android's NDK version by p4a is: 23b
# Android NDK is missing, downloading
# Downloading https://dl.google.com/android/repository/android-ndk-r23b-linux.zip
# Unpacking Android NDK

But I notice the NDK file name is different to your case.

Is buildozer current?

Frédéric

unread,
Sep 27, 2022, 4:37:22 PM9/27/22
to Kivy users support
Thanks for your answer.
Renaming doesn't work for me.
I think I have the lastest version, i did pip install --user buildozer
My version is Buildozer 1.3.0

Frederic

Robert

unread,
Sep 27, 2022, 5:39:02 PM9/27/22
to Kivy users support
(renaming ~/.buildozer was just my way of testing here)

Current Buildozer is 1.4.0
Update Buildozer and 'buildozer appclean' the project before build.

Frédéric

unread,
Sep 27, 2022, 7:13:09 PM9/27/22
to Kivy users support
Thanks, it worked!
For other noobs like me:
buildozer doesn't upgrade with
pip install buildozer
but with
python3 -m pip install --upgrade buildozer
Reply all
Reply to author
Forward
0 new messages