Problems generating .aab package using buildozer (kivy)

20 views Asked by At

I'm having difficulty compiling my app in .aab, I would like to count on the group's collaboration to help me with this objective. From now on I would like to say that I am not a programming professional, I am just a Civil Engineer who learned Python and uses it as another work tool. About a year ago I managed with great difficulty to compile my app in .aab following a video tutorial that I found on YouTube, however today when I tried to follow the same step by step that I did previously, I was unsuccessful. I will show you the step by step I performed and the error that occurred to me.

sudo apt install python3

sudo apt update

sudo apt install -y git zip unzip openjdk-13-jdk python3-pip autoconf libtool pkg-config zlib1g-dev libncurses5-dev libncursesw5-dev libtinfo5 cmake libffi-dev libssl-dev

An error appears in this part saying that "openjdk-13-jdk" is not available, so I replaced it with "openjdk-21-jdk" and this time it was

pip3 install git+https://github.com/misl6/buildozer.git@feat/aab-support

pip3 install cython

echo 'export PATH=$PATH:~/.local/bin/' >> .bashrc

source .bashrc

buildozer init

I modify the following lines

package.domain = org.grilu
presplash.filename = %(source.dir)s/presplash.png
icon.filename = %(source.dir)s/icon.png
android.presplash_color = white
android.api = 30
android.archs = arm64-v8a, armeabi-v7a
android.release_artifact = aab
p4a.branch = master

I navigate to the project folder, where buildozer.spec is and run

buildozer -v android release

error that occurs

# 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

Could anyone help me with this?

0

There are 0 answers