kivy / buildozer

Generic Python packager for Android and iOS
https://buildozer.readthedocs.io
MIT License
1.74k stars 499 forks source link

docker buildozer https://dl.google.com/android/repository/ android-ndk-r25b-linux-x86_64.zip not found #1599

Closed QGB closed 1 year ago

QGB commented 1 year ago

URL should be https://dl.google.com/android/repository/android-ndk-r25b-linux.zip

# Run 'git branch -vv'                                                                                                                                                             │·····
# Cwd /home/user/KivyJniusBluetoothApp/.buildozer/android/platform/python-for-android                                                                                              │·····
* master 56bf7335 [origin/master] Merge pull request #2747 from misl6/release-2023.02.10                                                                                           │·····
# Run '/usr/bin/python3 -m pip install -q --user \'appdirs\' \'colorama>=0.3.3\' \'jinja2\' \'sh>=1.10, <2.0; sys_platform!="nt"\' \'pep517\' \'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                                                                                                                                              │·····
https://dl.google.com/android/repository/ android-ndk-r25b-linux-x86_64.zip /home/user/.buildozer/android/platform                                                                 │·····
# 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             
QGB commented 1 year ago
root@ubuntu:~# docker run -itd --name buildozer --privileged=true --volume "$PWD":/home/user/hostcwd --entrypoint /bin/bash kivy/buildozer
Unable to find image 'kivy/buildozer:latest' locally
latest: Pulling from kivy/buildozer
345e3491a907: Pull complete
57671312ef6f: Pull complete
5e9250ddb7d0: Pull complete
115f87c729ac: Pull complete
56e6e1911a84: Pull complete
e5ff7a1bf291: Pull complete
2b877af83195: Pull complete
b6aa56a5521c: Pull complete
1a07ca398dcd: Pull complete
bacd4194cd2f: Pull complete
dfbd61b61bfa: Pull complete
Digest: sha256:93a2c938f6754d8ab9830d75f2bc9bae5b28862c12f959b666cdd14fbd0cacfb
Status: Downloaded newer image for kivy/buildozer:latest
9b4bb6881f9dae7c8f89e6f012cc4be77028e1bb6afd535d3c7504673f9d7e66
QGB commented 1 year ago
ANDROIDMINAPI=21 ANDROIDAPI=27 ANDROIDNDK=/home/user/.buildozer/android/platform/android-ndk-r25b ANDROIDSDK=/home/user/.buildozer/android/platform/android-sdk  /usr/bin/python3 -m pythonforandroid.toolchain create --dist_name=myapp --bootstrap=sdl2 --requirements=python3,kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir="/home/user/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a" --ndk-api=21 --ignore-setup-py

[INFO]:    Will compile for the following archs: armeabi-v7a
[INFO]:    Found Android API target in $ANDROIDAPI: 27
[WARNING]: Target API 27 < 30
[WARNING]: Target APIs lower than 30 are no longer supported on Google Play, and are not recommended. Note that the Target API can be higher than your device Android version, and should
 usually be as high as possible.
[INFO]:    Available Android APIs are (27)
[INFO]:    Requested API target 27 is available, continuing.
[INFO]:    Found NDK dir in $ANDROIDNDK: /home/user/.buildozer/android/platform/android-ndk-r25b
[INFO]:    Found NDK version 25b
[INFO]:    Getting NDK API version (i.e. minimum supported API) from user argument
[INFO]:    No existing dists meet the given requirements!
[INFO]:    No dist exists that meets your requirements, so one will be built.
[INFO]:    Found a single valid recipe set: ['hostpython3', 'libffi', 'openssl', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'sqlite3', 'python3', 'sdl2', 'setuptools', 'six', 'pyjnius', 'a
ndroid', 'kivy']
[INFO]:    The selected bootstrap is sdl2
[INFO]:    # Creating dist with sdl2 bootstrap
[INFO]:    Dist will have name myapp and requirements (python3, kivy)
[INFO]:    Dist contains the following requirements as recipes: ['hostpython3', 'libffi', 'openssl', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'sqlite3', 'python3', 'sdl2', 'setuptools',
'six', 'pyjnius', 'android', 'kivy']
[INFO]:    Dist will also contain modules (certifi) installed from pip
[INFO]:    Dist will be build in mode debug
[INFO]:    -> directory context /home/user/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/build/bootstrap_builds/sdl2
[INFO]:    <- directory context /home/user/KivyJniusBluetoothApp/.buildozer/android/platform/python-for-android
[INFO]:    Recipe build order is ['hostpython3', 'libffi', 'openssl', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'sqlite3', 'python3', 'sdl2', 'setuptools', 'six', 'pyjnius', 'android', 'k
ivy']
[INFO]:    The requirements (certifi) were not found as recipes, they will be installed with pip.
[INFO]:    # Downloading recipes
[INFO]:    Downloading hostpython3
[INFO]:    -> running mkdir -p /home/user/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/packages/hostpython3
[INFO]:    -> directory context /home/user/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/packages/hostpython3
[INFO]:    -> running basename https://www.python.org/ftp/python/3.9.9/Python-3.9.9.tgz
[INFO]:    hostpython3 download already cached, skipping
[INFO]:    <- directory context /home/user/KivyJniusBluetoothApp/.buildozer/android/platform/python-for-android
[INFO]:    Downloading libffi
[INFO]:    -> running mkdir -p /home/user/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/packages/libffi
[INFO]:    -> directory context /home/user/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/packages/libffi
[INFO]:    -> running basename https://github.com/libffi/libffi/archive/v3.4.2.tar.gz
[INFO]:    libffi download already cached, skipping
[INFO]:    <- directory context /home/user/KivyJniusBluetoothApp/.buildozer/android/platform/python-for-android
[INFO]:    Downloading openssl
[INFO]:    -> running mkdir -p /home/user/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/packages/openssl
[INFO]:    -> directory context /home/user/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/packages/openssl
[INFO]:    -> running basename https://www.openssl.org/source/openssl-1.1.1m.tar.gz
[INFO]:    -> running rm -f .mark-openssl-1.1.1m.tar.gz
[INFO]:    Downloading openssl from https://www.openssl.org/source/openssl-1.1.1m.tar.gz
Traceback (most recent call last):
  File "/usr/lib/python3.8/urllib/request.py", line 1350, in do_open
    h.request(req.get_method(), req.selector, req.data, headers,
  File "/usr/lib/python3.8/http/client.py", line 1255, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.8/http/client.py", line 1301, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.8/http/client.py", line 1250, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.8/http/client.py", line 1010, in _send_output
    self.send(msg)
  File "/usr/lib/python3.8/http/client.py", line 950, in send
    self.connect()
  File "/usr/lib/python3.8/http/client.py", line 1417, in connect
    super().connect()
  File "/usr/lib/python3.8/http/client.py", line 921, in connect
    self.sock = self._create_connection(
  File "/usr/lib/python3.8/socket.py", line 808, in create_connection
    raise err
  File "/usr/lib/python3.8/socket.py", line 796, in create_connection
    sock.connect(sa)
OSError: [Errno 99] Cannot assign requested address

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/user/KivyJniusBluetoothApp/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1313, in <module>
    main()
  File "/home/user/KivyJniusBluetoothApp/.buildozer/android/platform/python-for-android/pythonforandroid/entrypoints.py", line 18, in main
    ToolchainCL()
  File "/home/user/KivyJniusBluetoothApp/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 735, in __init__
    getattr(self, command)(args)
  File "/home/user/KivyJniusBluetoothApp/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 153, in wrapper_func
    build_dist_from_args(ctx, dist, args)
  File "/home/user/KivyJniusBluetoothApp/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 212, in build_dist_from_args
    build_recipes(build_order, python_modules, ctx,
  File "/home/user/KivyJniusBluetoothApp/.buildozer/android/platform/python-for-android/pythonforandroid/build.py", line 482, in build_recipes
    recipe.download_if_necessary()
  File "/home/user/KivyJniusBluetoothApp/.buildozer/android/platform/python-for-android/pythonforandroid/recipe.py", line 348, in download_if_necessary
    self.download()
  File "/home/user/KivyJniusBluetoothApp/.buildozer/android/platform/python-for-android/pythonforandroid/recipe.py", line 398, in download
    self.download_file(self.versioned_url, filename)
  File "/home/user/KivyJniusBluetoothApp/.buildozer/android/platform/python-for-android/pythonforandroid/recipe.py", line 202, in download_file
    urlretrieve(url, target, report_hook)
  File "/usr/lib/python3.8/urllib/request.py", line 247, in urlretrieve
    with contextlib.closing(urlopen(url, data)) as fp:
  File "/usr/lib/python3.8/urllib/request.py", line 222, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.8/urllib/request.py", line 525, in open
    response = self._open(req, data)
  File "/usr/lib/python3.8/urllib/request.py", line 542, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
  File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.8/urllib/request.py", line 1393, in https_open
    return self.do_open(http.client.HTTPSConnection, req,
  File "/usr/lib/python3.8/urllib/request.py", line 1353, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [Errno 99] Cannot assign requested address>
Download failed: <urlopen error [Errno 99] Cannot assign requested address>; retrying in 1 second(s)...Download failed: <urlopen error [Errno 99] Cannot assign requested address>; retry
ing in 2 second(s)...Download failed: <urlopen error [Errno 99] Cannot assign requested address>; retrying in 4 second(s)...Download failed: <urlopen error [Errno 99] Cannot assign requ
ested address>; retrying in 8 second(s)...user@66b55f25ea77:~/KivyJniusBluetoothApp/.buildozer/android/platform/python-for-android$
QGB commented 1 year ago
ndroid', 'kivy']
[INFO]:    The selected bootstrap is sdl2
[INFO]:    # Creating dist with sdl2 bootstrap
[INFO]:    Dist will have name myapp and requirements (python3, kivy)
[INFO]:    Dist contains the following requirements as recipes: ['hostpython3', 'libffi', 'openssl', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'sqlite3', 'python3', 'sdl2', 'setuptools', 'six', 'pyjnius', 'android', 'kivy']
[INFO]:    Dist will also contain modules (certifi) installed from pip
[INFO]:    Dist will be build in mode debug
[INFO]:    -> directory context /home/user/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/build/bootstrap_builds/sdl2
[INFO]:    <- directory context /home/user/KivyJniusBluetoothApp/.buildozer/android/platform/python-for-android
[INFO]:    Recipe build order is ['hostpython3', 'libffi', 'openssl', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'sqlite3', 'python3', 'sdl2', 'setuptools', 'six', 'pyjnius', 'android', 'kivy']
[INFO]:    The requirements (certifi) were not found as recipes, they will be installed with pip.
[INFO]:    # Downloading recipes 
[INFO]:    Downloading hostpython3
[INFO]:    -> running mkdir -p /home/user/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/packages/hostpython3
[INFO]:    -> directory context /home/user/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/packages/hostpython3
[INFO]:    -> running basename https://www.python.org/ftp/python/3.9.9/Python-3.9.9.tgz
[INFO]:    hostpython3 download already cached, skipping                                                                                                                                
[INFO]:    <- directory context /home/user/KivyJniusBluetoothApp/.buildozer/android/platform/python-for-android
[INFO]:    Downloading libffi
[INFO]:    -> running mkdir -p /home/user/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/packages/libffi
[INFO]:    -> directory context /home/user/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/packages/libffi
[INFO]:    -> running basename https://github.com/libffi/libffi/archive/v3.4.2.tar.gz
[INFO]:    libffi download already cached, skipping                                                                                                                                     
[INFO]:    <- directory context /home/user/KivyJniusBluetoothApp/.buildozer/android/platform/python-for-android
[INFO]:    Downloading openssl
[INFO]:    -> running mkdir -p /home/user/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/packages/openssl
[INFO]:    -> directory context /home/user/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/packages/openssl
[INFO]:    -> running basename https://www.openssl.org/source/openssl-1.1.1m.tar.gz
[INFO]:    -> running rm -f .mark-openssl-1.1.1m.tar.gz                                                                                                                                 
[INFO]:    Downloading openssl from https://www.openssl.org/source/openssl-1.1.1m.tar.gz
======================================================= ('184.87.135.30', 443)
[INFO]:    -> running touch .mark-openssl-1.1.1m.tar.gz
[INFO]:    <- directory context /home/user/KivyJniusBluetoothApp/.buildozer/android/platform/python-for-android
[INFO]:    Downloading sdl2_image
[INFO]:    -> running mkdir -p /home/user/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/packages/sdl2_image
[INFO]:    -> directory context /home/user/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/packages/sdl2_image
[INFO]:    -> running basename https://github.com/libsdl-org/SDL_image/releases/download/release-2.6.2/SDL2_image-2.6.2.tar.gz
[INFO]:    -> running rm -f .mark-SDL2_image-2.6.2.tar.gz                                                                                                                               
[INFO]:    Downloading sdl2_image from https://github.com/libsdl-org/SDL_image/releases/download/release-2.6.2/SDL2_image-2.6.2.tar.gz
======================================================= ('20.205.243.166', 443)
======================================================= ('185.199.111.133', 443)
- Download 69.28%
QGB commented 1 year ago
[INFO]:    Building pyjnius for armeabi-v7a
[INFO]:    jnius apparently isn't already in site-packages
[INFO]:    Cythonizing anything necessary in pyjnius
[INFO]:    -> directory context /home/user/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/pyjnius-sdl2/armeabi-v7a__ndk_target_21/pyjnius
[INFO]:    -> running python3 -c import sys; print(sys.path)
[INFO]:    Trying first build of pyjnius to get cython files: this is expected to fail
[INFO]:    -> running python3 setup.py build_ext -v
           working: error: command '/usr/bin/ccache' failed with exit code 1                                                                                                            E
xception in thread background thread for pid 14777:
Traceback (most recent call last):
  File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.8/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/home/user/.local/lib/python3.8/site-packages/sh.py", line 1637, in wrap
    fn(*rgs, **kwargs)
  File "/home/user/.local/lib/python3.8/site-packages/sh.py", line 2561, in background_thread
    handle_exit_code(exit_code)
  File "/home/user/.local/lib/python3.8/site-packages/sh.py", line 2265, in fn
    return self.command.handle_command_exit_code(exit_code)
  File "/home/user/.local/lib/python3.8/site-packages/sh.py", line 865, in handle_command_exit_code
    raise exc
sh.ErrorReturnCode_1:

  RAN: /home/user/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build/python3 setup.py build_ext -v

  STDOUT:
warning: [options] bootstrap class path not set in conjunction with -source 7
warning: [options] source value 7 is obsolete and will be removed in a future release
warning: [options] target value 7 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
4 warnings
running build_ext
building 'jnius' extension
creating build
creating build/temp.linux-x86_64-3.9
creating build/temp.linux-x86_64-3.9/jnius
/usr/bin/ccache /home/user/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -target armv7a-linux-androideabi21 -fomit-frame-pointer -march=ar
mv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb -fPIC -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -target armv7a-linux-androideabi21 -fomit-frame-pointer -march=armv7-a -
mfloat-abi=softfp -mfpu=vfp -mthumb -fPIC -I/home/user/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/python3/armeabi-v7a__ndk_target_21/python3/
Include -DANDROID -I/home/user/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include -I/home/user/KivyJniusBluetoothApp/.buildozer/andro
id/platform/build-armeabi-v7a/build/python-installs/myapp/armeabi-v7a/include/python3.9 -fPIC -I/home/user/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/build/othe
r_builds/hostpython3/desktop/hostpython3/Include -I/home/user/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/nati
ve-build -c jnius/jnius.c -o build/temp.linux-x86_64-3.9/jnius/jnius.o
clang-14: error: no such file or directory: 'jnius/jnius.c'
clang-14: error: no input files
error: command '/usr/bin/ccache' failed with exit code 1

  STDERR:

[INFO]:    pyjnius first build failed (as expected)
[INFO]:    Running cython where appropriate
[INFO]:    Cythonize jnius/jnius.pyx
[INFO]:    -> running python3 -cimport sys; from Cython.Compiler.Main import setuptools_main; sys.exit(setuptools_main()); ./jnius/jnius.pyx

[INFO]:    -> running python3 setup.py build_ext -v
           working: /usr/bin/ccache /home/user/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -target armv7a-linux-andr...(and 1035 more)
QGB commented 1 year ago
> /home/user/KivyJniusBluetoothApp/.buildozer/android/platform/python-for-android/pythonforandroid/logger.py(168)shprint()
-> output = command(*args, **kwargs)
(Pdb) exit
Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/user/KivyJniusBluetoothApp/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1316, in <module>
    main()
  File "/home/user/KivyJniusBluetoothApp/.buildozer/android/platform/python-for-android/pythonforandroid/entrypoints.py", line 18, in main
    ToolchainCL()
  File "/home/user/KivyJniusBluetoothApp/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 737, in __init__
    getattr(self, command)(args)
  File "/home/user/KivyJniusBluetoothApp/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 154, in wrapper_func
    func(self, args, **kw)
  File "/home/user/KivyJniusBluetoothApp/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1178, in apk
    output, build_args = self._build_package(args, package_type='apk')
  File "/home/user/KivyJniusBluetoothApp/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1118, in _build_package
    output = shprint(gradlew, "clean", gradle_task, _tail=20,
  File "/home/user/KivyJniusBluetoothApp/.buildozer/android/platform/python-for-android/pythonforandroid/logger.py", line 168, in shprint
    output = command(*args, **kwargs)
  File "/home/user/KivyJniusBluetoothApp/.buildozer/android/platform/python-for-android/pythonforandroid/logger.py", line 168, in shprint
    output = command(*args, **kwargs)
  File "/usr/lib/python3.8/bdb.py", line 88, in trace_dispatch
    return self.dispatch_line(frame)
  File "/usr/lib/python3.8/bdb.py", line 113, in dispatch_line
    if self.quitting: raise BdbQuit
bdb.BdbQuit
# Command failed: /usr/bin/python3 -m pythonforandroid.toolchain apk --debug --bootstrap=sdl2 --dist_name myapp --name 'My Application' --version 0.1 --package org.test.myapp --minsdk 2
1 --ndk-api 21 --private /home/user/KivyJniusBluetoothApp/.buildozer/android/app --android-entrypoint org.kivy.android.PythonActivity --android-apptheme @android:style/Theme.NoTitleBar
--orientation portrait --window --copy-libs --arch armeabi-v7a --color=always --storage-dir="/home/user/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a" --ndk-api=21
 --ignore-setup-py
# ENVIRONMENT:
#     HOSTNAME = '66b55f25ea77'
#     LANGUAGE = 'en_US.UTF-8'
#     PWD = '/home/user/KivyJniusBluetoothApp'
#     WORK_DIR = '/home/user/hostcwd'
#     HOME = '/home/user'
#     LANG = 'en_US.UTF-8'
#     LS_COLORS = 'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar
=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:
*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01
;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.
jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.
svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nu
v=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35
:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.op
us=00;36:*.spx=00;36:*.xspf=00;36:'
#     TERM = 'xterm'
#     HOME_DIR = '/home/user'
#     USER = 'user'
#     SHLVL = '1'
#     SRC_DIR = '/home/user/src'
#     LC_ALL = 'en_US.UTF-8'
#     PATH = '/home/user/.buildozer/android/platform/apache-ant-1.9.4/bin:/home/user/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
#     OLDPWD = '/home/user/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/dists/myapp'
#     _ = '/home/user/.local/bin/buildozer'
#     PACKAGES_PATH = '/home/user/.buildozer/android/packages'
#     ANDROIDSDK = '/home/user/.buildozer/android/platform/android-sdk'
#     ANDROIDNDK = '/home/user/.buildozer/android/platform/android-ndk-r25b'
#     ANDROIDAPI = '27'
#     ANDROIDMINAPI = '21'
#
# Buildozer failed to execute the last command
# The error might be hidden in the log above this error
# Please read the full log, and search for it before
# raising an issue with buildozer itself.
# In case of a bug report, please add a full log with log_level = 2
user@66b55f25ea77:~/KivyJniusBluetoothApp$ cd -
/home/user/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/dists/myapp
user@66b55f25ea77:~/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/dists/myapp$
user@66b55f25ea77:~/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/dists/myapp$ ANDROIDMINAPI=21 ANDROIDAPI=27 ANDROIDNDK=/home/user/.buildozer/android/platform/and
roid-ndk-r25b ANDROIDSDK=/home/user/.buildozer/android/platform/android-sdk  gradlew clean assembleDebug
bash: gradlew: command not found
user@66b55f25ea77:~/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/dists/myapp$ ANDROIDMINAPI=21 ANDROIDAPI=27 ANDROIDNDK=/home/user/.buildozer/android/platform/and
roid-ndk-r25b ANDROIDSDK=/home/user/.buildozer/android/platform/android-sdk  ./gradlew clean assembleDebug
^Cuser@66b55f25ea77:~/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/dists/myapp$ ANDROIDMINAPI=21 ANDROIDAPI=27 ANDROIDNDK=/home/user/.buildozer/android/platform/a
ndroid-ndk-r25b ANDROIDSDK=/home/user/.buildozer/android/platform/android-sdk  ./gradlew clean assembleDebug -d
^Cuser@66b55f25ea77:~/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/dists/myapp$
user@66b55f25ea77:~/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/dists/myapp$
user@66b55f25ea77:~/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/dists/myapp$
user@66b55f25ea77:~/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/dists/myapp$ export http_proxy=socks5h://192.168.1.20:21080
user@66b55f25ea77:~/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/dists/myapp$ export https_proxy=$http_proxy
user@66b55f25ea77:~/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/dists/myapp$ ANDROIDMINAPI=21 ANDROIDAPI=27 ANDROIDNDK=/home/user/.buildozer/android/platform/and
roid-ndk-r25b ANDROIDSDK=/home/user/.buildozer/android/platform/android-sdk  ./gradlew clean assembleDebug -d

^C^Cuser@66b55f25ea77:~/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/dists/myapp$ ^C
user@66b55f25ea77:~/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/dists/myapp$ ANDROIDMINAPI=21 ANDROIDAPI=27 ANDROIDNDK=/home/user/.buildozer/android/platform/and
roid-ndk-r25b ANDROIDSDK=/home/user/.buildozer/android/platform/android-sdk  ./gradlew --offline clean assembleDebug
^Cuser@66b55f25ea77:~/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/dists/myapp$ ANDROIDMINAPI=21 ANDROIDAPI=27 ANDROIDNDK=/home/user/.buildozer/android/platform/a
ndroid-ndk-r25b ANDROIDSDK=/home/user/.buildozer/android/platform/android-sdk  ./gradlew --offline clean assembleDebug --info
Exception in thread "main" java.lang.RuntimeException: Timeout of 120000 reached waiting for exclusive access to file: /home/user/.gradle/wrapper/dists/gradle-7.4.1-all/8bevta3mh7872g50
ecurigeld/gradle-7.4.1-all.zip
        at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:61)
        at org.gradle.wrapper.Install.createDist(Install.java:44)
        at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:126)
        at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:56)
user@66b55f25ea77:~/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/dists/myapp$ cd -
/home/user/KivyJniusBluetoothApp
user@66b55f25ea77:~/KivyJniusBluetoothApp$
(failed reverse-i-search)`grep': ANDROIDMINAPI=21 ANDROIDAPI=27 ANDROIDNDK=/home/user/.buildozer/android/platform/android-ndk-r25b ANDROIDSDK=/home/user/.buildozer/android/platform/andr
oid-sdk  ./^Cadlew --offline clean assembleDebug --info
user@66b55f25ea77:~/KivyJniusBluetoothApp$

/home/user/.gradle/wrapper/dists/gradle-7.4.1-all
/home/user/.gradle/wrapper/dists/gradle-7.4.1-all/8bevta3mh7872g50ecurigeld/gradle-7.4.1-all.zip.part
/home/user/.gradle/wrapper/dists/gradle-7.4.1-all/8bevta3mh7872g50ecurigeld/gradle-7.4.1-all.zip.lck
/home/user/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/dists/myapp/gradlew.bat
/home/user/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/dists/myapp/gradle.properties
/home/user/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/dists/myapp/jni/SDL/android-project/gradlew.bat
/home/user/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/dists/myapp/jni/SDL/android-project/settings.gradle
/home/user/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/dists/myapp/jni/SDL/android-project/gradle.properties
/home/user/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/dists/myapp/jni/SDL/android-project/app/build.gradle
/home/user/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/dists/myapp/jni/SDL/android-project/gradlew
/home/user/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/dists/myapp/jni/SDL/android-project/build.gradle
/home/user/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/dists/myapp/jni/SDL/android-project/gradle
/home/user/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/dists/myapp/jni/SDL/android-project/gradle/wrapper/gradle-wrapper.properties
/home/user/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/dists/myapp/jni/SDL/android-project/gradle/wrapper/gradle-wrapper.jar
/home/user/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/dists/myapp/jni/SDL2_image/external/libwebp/gradlew.bat
/home/user/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/dists/myapp/jni/SDL2_image/external/libwebp/gradle.properties
/home/user/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/dists/myapp/jni/SDL2_image/external/libwebp/gradlew
/home/user/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/dists/myapp/jni/SDL2_image/external/libwebp/build.gradle
/home/user/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/dists/myapp/jni/SDL2_image/external/libwebp/gradle
/home/user/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/dists/myapp/jni/SDL2_image/external/libwebp/gradle/wrapper/gradle-wrapper.properties
/home/user/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/dists/myapp/jni/SDL2_image/external/libwebp/gradle/wrapper/gradle-wrapper.jar
/home/user/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/dists/myapp/gradlew
/home/user/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/dists/myapp/build.gradle
/home/user/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/dists/myapp/templates/gradle.tmpl.properties
/home/user/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/dists/myapp/templates/build.tmpl.gradle
/home/user/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/dists/myapp/gradle
/home/user/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/dists/myapp/gradle/wrapper/gradle-wrapper.properties
/home/user/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/dists/myapp/gradle/wrapper/gradle-wrapper.jar
user@66b55f25ea77:~/KivyJniusBluetoothApp$
QGB commented 1 year ago
In [29]: cd .gradle/wrapper/dists/gradle-7.4.1-all/8bevta3mh7872g50ecurigeld/
/root/docker/buildozer/user/.gradle/wrapper/dists/gradle-7.4.1-all/8bevta3mh7872g50ecurigeld

In [30]:

In [30]: ls
gradle-7.4.1-all.zip.lck  gradle-7.4.1-all.zip.part

In [31]:

In [31]: !aria2c https://services.gradle.org/distributions/gradle-7.4.1-all.zip

04/27 16:43:10 [NOTICE] Downloading 1 item(s)
[#3bc62d 0B/0B CN:1 DL:0B]
04/27 16:43:12 [NOTICE] CUID#7 - Redirecting to https://downloads.gradle.org/distributions/gradle-7.4.1-all.zip
 *** Download Progress Summary as of Thu Apr 27 16:44:10 2023 ***
========================================================================================================================================================================================
[#3bc62d 23MiB/151MiB(15%) CN:1 DL:697KiB ETA:3m8s]
FILE: /root/docker/buildozer/user/.gradle/wrapper/dists/gradle-7.4.1-all/8bevta3mh7872g50ecurigeld/gradle-7.4.1-all.zip
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 *** Download Progress Summary as of Thu Apr 27 16:45:11 2023 ***
========================================================================================================================================================================================
[#3bc62d 125MiB/151MiB(82%) CN:1 DL:2.0MiB ETA:12s]
FILE: /root/docker/buildozer/user/.gradle/wrapper/dists/gradle-7.4.1-all/8bevta3mh7872g50ecurigeld/gradle-7.4.1-all.zip
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

[#3bc62d 150MiB/151MiB(98%) CN:1 DL:2.0MiB]
04/27 16:45:24 [NOTICE] Download complete: /root/docker/buildozer/user/.gradle/wrapper/dists/gradle-7.4.1-all/8bevta3mh7872g50ecurigeld/gradle-7.4.1-all.zip

Download Results:
gid   |stat|avg speed  |path/URI
======+====+===========+=======================================================
3bc62d|OK  |   1.1MiB/s|/root/docker/buildozer/user/.gradle/wrapper/dists/gradle-7.4.1-all/8bevta3mh7872g50ecurigeld/gradle-7.4.1-all.zip

Status Legend:
(OK):download completed.

In [32]:

In [32]:

In [32]: ls
gradle-7.4.1-all.zip  gradle-7.4.1-all.zip.lck  gradle-7.4.1-all.zip.part

In [33]: !rm gradle-7.4.1-all.zip.*
QGB commented 1 year ago

sudo apt install -y vim autopoint

QGB commented 1 year ago

ln -s file1 link1

ln -s /home/user/KivyJniusBluetoothApp/.buildozer/android/platform/build-armeabi-v7a/build/bootstrap_builds/sdl2/jni/SDL2_image/external/download.sh /home/user/KivyJniusBluetoothApp/.buildozer/android/platform/build-arm64-v8a/build/bootstrap_builds/sdl2/jni/SDL2_image/external/download.sh

QGB commented 1 year ago

failed to authenticate to 192.168

adb: device unauthorized. This adb server's $ADB_VENDOR_KEYS is not set

替换 \192.168.1.11\smb\root\docker\buildozer\user.android

C:\Users\qgb.android\adbkey C:\Users\qgb.android\adbkey.pub

misl6 commented 1 year ago

Hi @QGB !

The issue you're encountering has been fixed on buildozer a long time ago via https://github.com/kivy/buildozer/pull/1427

We do not push the docker image anymore, so it's outdated.

Please refer to the README.md file for installation and usage.