buildozer
buildozer copied to clipboard
BUILD FAILED: gradlew failed!
Versions
Python: 3.7
OS: Ubuntu 16.04
Buildozer: 0.40.dev0
Kivy: 1.10.1
Cython: 0.29
Javac: 9-internal
NDK: r17c
SDK: 28
Description Unable to build apk with gradle after successfully creating the distribution package. I'm getting javac related errors and no python to compile in zip.
Command: python -m buildozer android debug (python3.7==python)
Spec [app]
title = Space Square
package.name = SpaceFX
package.domain = Distrosonics.com
source.dir = .
source.include_exts = py,png,jpg,kv,atlas,wav
version = 1.0
requirements = python3,kivy==1.10.1,pyjnius,numpy,sounddevice,soundfile
orientation = all
osx.python_version = 3.7.1
osx.kivy_version = 1.10.1
fullscreen = 0
android.api = 28
android.arch = arm64-v8a
[buildozer]
log_level = 2
warn_on_root = 1
Log [INFO]: Selecting java build tool: [INFO]: Detected highest available build tools version to be 28.0.3 [INFO]: Building with gradle, as gradle executable is present [DEBUG]: -> running gradlew assembleDebug [DEBUG]: [DEBUG]: FAILURE: Build failed with an exception. [DEBUG]: [DEBUG]: * What went wrong: [DEBUG]: Execution failed for task ':compileDebugJavaWithJavac'. [DEBUG]: > java.lang.reflect.UndeclaredThrowableException [DEBUG]: [DEBUG]: * Try: [DEBUG]: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. [DEBUG]: [DEBUG]: * Get more help at https://help.gradle.org [DEBUG]: [DEBUG]: BUILD FAILED in 24s [DEBUG]: 15 actionable tasks: 15 executed [DEBUG]: [DEBUG]: Exception in thread background thread for pid 15063: Traceback (most recent call last): File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner self.run() File "/usr/lib/python3.7/threading.py", line 865, in run self._target(*self._args, **self._kwargs) File "/home/distorta/.local/lib/python3.7/site-packages/sh.py", line 1540, in wrap fn(*args, **kwargs) File "/home/distorta/.local/lib/python3.7/site-packages/sh.py", line 2459, in background_thread handle_exit_code(exit_code) File "/home/distorta/.local/lib/python3.7/site-packages/sh.py", line 2157, in fn return self.command.handle_command_exit_code(exit_code) File "/home/distorta/.local/lib/python3.7/site-packages/sh.py", line 815, in handle_command_exit_code raise exc sh.ErrorReturnCode_1:
RAN: /home/distorta/Desktop/Shaped/.buildozer/android/platform/build/dists/SpaceFX/gradlew assembleDebug
STDOUT:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileDebugJavaWithJavac'.
> java.lang.reflect.UndeclaredThrowableException
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 24s
15 actionable tasks: 15 executed
STDERR:
[INFO]: STDOUT:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileDebugJavaWithJavac'.
> java.lang.reflect.UndeclaredThrowableException
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 24s
15 actionable tasks: 15 executed
[INFO]: STDERR:
[INFO]: COMMAND:
cd /home/distorta/Desktop/Shaped/.buildozer/android/platform/build/dists/SpaceFX && /home/distorta/Desktop/Shaped/.buildozer/android/platform/build/dists/SpaceFX/gradlew assembleDebug
[WARNING]: ERROR: /home/distorta/Desktop/Shaped/.buildozer/android/platform/build/dists/SpaceFX/gradlew failed!
WARNING: Received a --sdk argument, but this argument is deprecated and does nothing.
No compiled python is present to zip, skipping.
Applying Java source code patches...
Applying patch: src/patches/SDLActivity.java.patch
# Command failed: /usr/bin/python3.7 -m pythonforandroid.toolchain apk --debug --bootstrap=sdl2 --dist_name SpaceFX --name 'Space Square' --version 1.0 --package distrosonics.com.spacefx --android_api 28 --minsdk 21 --ndk-api 21 --private /home/distorta/Desktop/Shaped/.buildozer/android/app --orientation sensor --window --copy-libs --arch arm64-v8a --color=always --storage-dir="/home/distorta/Desktop/Shaped/.buildozer/android/platform/build" --ndk-api=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
Nevermind I was able to have a successful build by using Oracles Java 8 not open jdk.
sudo add-apt-repository ppa:webupd8team/java -y
sudo apt-get update
sudo apt-get install oracle-java8-installer**
Thanks for coming back to that issue with an update.
That's still weird however since we're using openjdk-8-jdk
on both buildozer and p4a Docker containers and it works fine
Command:
python -m buildozer android debug deploy run logcat
So apparently the build was "successful" but the apk itself is unable to run. There is a no compiled python is present to zip and the java patch failed (exit code 1). Any ideas?
LOG: [DEBUG]: -> running gradlew assembleDebug [DEBUG]: [DEBUG]: BUILD SUCCESSFUL in 14s [DEBUG]: 27 actionable tasks: 4 executed, 23 up-to-date
[INFO]: <- directory context /home/distorta/Desktop/Shaped/.buildozer/android/platform/python-for-android
[INFO]: # Copying APK to current directory
[INFO]: # APK filename not found in build output. Guessing...
[INFO]: # Found APK file: /home/distorta/Desktop/Shaped/.buildozer/android/platform/build/dists/SpaceFX/build/outputs/apk/debug/SpaceFX-debug.apk
[INFO]: # Add version number to APK
[INFO]: # APK renamed to SpaceFX-1.0-debug.apk
[DEBUG]: -> running cp /home/distorta/Desktop/Shaped/.buildozer/android/platform/build/dists/SpaceFX/build/outputs/apk/debug/SpaceFX-debug.apk SpaceFX-1.0-debug.apk
WARNING: Received a --sdk argument, but this argument is deprecated and does nothing.
No compiled python is present to zip, skipping.
Applying Java source code patches...
Applying patch: src/patches/SDLActivity.java.patch
Warning: failed to apply patch (exit code 1), assuming it is already applied: src/patches/SDLActivity.java.patch
# Android packaging done!
# APK SpaceFX-1.0-debug.apk available in the bin directory
# Run '/home/distorta/.buildozer/android/platform/android-sdk/platform-tools/adb devices'
# Cwd None
List of devices attached
# Application pushed.
# Application started.
# Run 'dpkg --version'
# Cwd None
Debian 'dpkg' package management program version 1.18.4 (amd64).
This is free software; see the GNU General Public License version 2 or
later for copying conditions. There is NO warranty.
# Search for Git (git)
# -> found at /usr/bin/git
# Search for Cython (cython)
# -> found at /usr/local/bin/cython
# Search for Java compiler (javac)
# -> found at /usr/lib/jvm/java-8-openjdk-amd64/bin/javac
# Search for Java keytool (keytool)
# -> found at /usr/lib/jvm/java-9-openjdk-amd64/bin/keytool
OK can you try building it from Docker?
docker run \
--volume "$HOME/.buildozer":/home/user/.buildozer \
--volume "$PWD":/home/user/hostcwd \
kivy/buildozer android debug
Deployment is not yet working from Docker, but you can deploy the APK directly with adb install
outside Docker.
Also you may need to clean your ~/.buildozer
and .buildozer
directories as they could clash with Docker. So before running the build from Docker you can go to your project dir and:
rm -rf ~/.buildozer .buildozer && mkdir ~/.buildozer`
I could use Docker, but I am not really familiar with it yet and I'll need to set some time aside to figure that out. As for using just Buildozer I was able to use android studios debugger after the buildozer apk was compiled and I got this error: No module named '_cffi_backend'
. I installed cffi build-essential libssl-dev libffi-dev python-dev
with pip and still getting the module error.
Here is a stack that helped me out: https://stackoverflow.com/questions/34370962/no-module-named-cffi-backend
I had to force reinstall cffi
and upgrade pip -vvv install --upgrade --force-reinstall cffi
to make sure FFI()
could be instantiated in python. Then I included cffi
in the specs under requirements to get past the error. I was using sounddevice
so I had included that in the requirements but left out cffi because it was a requirement by sounddevice.
However:
sounddevice requires pyaudio
that is built on portaudios
c/c++ bindings and 3.7 is not compatible with pyaudio. So I have to use python 3.6. At this point because of how finicky the recipes are I am going to have to just use kivy's native sound player that is more limited. Unless, anyone knows of a good standing recipe of versions to use in this build, especially with cython, that works with python 3.7
`INFO: Selecting java build tool:
INFO: Detected highest available build tools version to be 29.0.0-rc3
INFO: Building with gradle, as gradle executable is present
[DEBUG]: -> running gradlew assembleDebug
[DEBUG]: Unzipping /home/joshua/.gradle/wrapper/dists/gradle-4.4-all/4th6d42q1kgladv9hkn2iehgi5/gradle-4.4-all.zip to /home/joshua/.gradle/wrapper/dists/gradle-4.4-all/4th6d42q1kgladv9hkn2iehgi5
[DEBUG]: Exception in thread "main" java.util.zip.ZipException: error in opening zip file
[DEBUG]: at java.util.zip.ZipFile.open(Native Method)
[DEBUG]: at java.util.zip.ZipFile.
RAN: /home/joshua/Documents/myProjects/firstapp/.buildozer/android/platform/build/dists/myapp/gradlew assembleDebug
STDOUT:
Unzipping /home/joshua/.gradle/wrapper/dists/gradle-4.4-all/4th6d42q1kgladv9hkn2iehgi5/gradle-4.4-all.zip to /home/joshua/.gradle/wrapper/dists/gradle-4.4-all/4th6d42q1kgladv9hkn2iehgi5
Exception in thread "main" java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.
STDERR:
Unzipping /home/joshua/.gradle/wrapper/dists/gradle-4.4-all/4th6d42q1kgladv9hkn2iehgi5/gradle-4.4-all.zip to /home/joshua/.gradle/wrapper/dists/gradle-4.4-all/4th6d42q1kgladv9hkn2iehgi5
Exception in thread "main" java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.
cd /home/joshua/Documents/myProjects/firstapp/.buildozer/android/platform/build/dists/myapp && /home/joshua/Documents/myProjects/firstapp/.buildozer/android/platform/build/dists/myapp/gradlew assembleDebug
[WARNING]: ERROR: /home/joshua/Documents/myProjects/firstapp/.buildozer/android/platform/build/dists/myapp/gradlew failed! WARNING: Received a --sdk argument, but this argument is deprecated and does nothing. No compiled python is present to zip, skipping. No setup.py/pyproject.toml used, copying full private data into .apk. Applying Java source code patches... Applying patch: src/patches/SDLActivity.java.patch Warning: failed to apply patch (exit code 1), assuming it is already applied: src/patches/SDLActivity.java.patch
Command failed: /home/joshua/anaconda3/bin/python -m pythonforandroid.toolchain apk --debug --bootstrap=sdl2 --dist_name myapp --name 'My Application' --version 0.1 --package org.test.myapp --android_api 27 --minsdk 21 --ndk-api 21 --private /home/joshua/Documents/myProjects/firstapp/.buildozer/android/app --orientation portrait --window --copy-libs --arch armeabi-v7a --color=always --storage-dir="/home/joshua/Documents/myProjects/firstapp/.buildozer/android/platform/build" --ndk-api=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
somebody to help me, still the error exists a almost five months now I can't move on with my project
`INFO: Selecting java build tool: INFO: Detected highest available build tools version to be 29.0.0-rc3 INFO: Building with gradle, as gradle executable is present [DEBUG]: -> running gradlew assembleDebug [DEBUG]: Unzipping /home/joshua/.gradle/wrapper/dists/gradle-4.4-all/4th6d42q1kgladv9hkn2iehgi5/gradle-4.4-all.zip to /home/joshua/.gradle/wrapper/dists/gradle-4.4-all/4th6d42q1kgladv9hkn2iehgi5 [DEBUG]: Exception in thread "main" java.util.zip.ZipException: error in opening zip file [DEBUG]: at java.util.zip.ZipFile.open(Native Method) [DEBUG]: at java.util.zip.ZipFile.(ZipFile.java:225) [DEBUG]: at java.util.zip.ZipFile.(ZipFile.java:155) [DEBUG]: at java.util.zip.ZipFile.(ZipFile.java:169) [DEBUG]: at org.gradle.wrapper.Install.unzip(Install.java:157) [DEBUG]: at org.gradle.wrapper.Install.access$400(Install.java:26) [DEBUG]: at org.gradle.wrapper.Install$1.call(Install.java:67) [DEBUG]: at org.gradle.wrapper.Install$1.call(Install.java:44) [DEBUG]: at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65) [DEBUG]: at org.gradle.wrapper.Install.createDist(Install.java:44) [DEBUG]: at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:126) [DEBUG]: at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:56) Exception in thread background thread for pid 16125: Traceback (most recent call last): File "/home/joshua/anaconda3/lib/python3.7/threading.py", line 917, in _bootstrap_inner self.run() File "/home/joshua/anaconda3/lib/python3.7/threading.py", line 865, in run self._target(*self._args, **self._kwargs) File "/home/joshua/anaconda3/lib/python3.7/site-packages/sh.py", line 1540, in wrap fn(*args, **kwargs) File "/home/joshua/anaconda3/lib/python3.7/site-packages/sh.py", line 2459, in background_thread handle_exit_code(exit_code) File "/home/joshua/anaconda3/lib/python3.7/site-packages/sh.py", line 2157, in fn return self.command.handle_command_exit_code(exit_code) File "/home/joshua/anaconda3/lib/python3.7/site-packages/sh.py", line 815, in handle_command_exit_code raise exc sh.ErrorReturnCode_1:
RAN: /home/joshua/Documents/myProjects/firstapp/.buildozer/android/platform/build/dists/myapp/gradlew assembleDebug
STDOUT: Unzipping /home/joshua/.gradle/wrapper/dists/gradle-4.4-all/4th6d42q1kgladv9hkn2iehgi5/gradle-4.4-all.zip to /home/joshua/.gradle/wrapper/dists/gradle-4.4-all/4th6d42q1kgladv9hkn2iehgi5 Exception in thread "main" java.util.zip.ZipException: error in opening zip file at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.(ZipFile.java:225) at java.util.zip.ZipFile.(ZipFile.java:155) at java.util.zip.ZipFile.(ZipFile.java:169) at org.gradle.wrapper.Install.unzip(Install.java:157) at org.gradle.wrapper.Install.access$400(Install.java:26) at org.gradle.wrapper.Install$1.call(Install.java:67) at org.gradle.wrapper.Install$1.call(Install.java:44) at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65) 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)
STDERR:
Unzipping /home/joshua/.gradle/wrapper/dists/gradle-4.4-all/4th6d42q1kgladv9hkn2iehgi5/gradle-4.4-all.zip to /home/joshua/.gradle/wrapper/dists/gradle-4.4-all/4th6d42q1kgladv9hkn2iehgi5 Exception in thread "main" java.util.zip.ZipException: error in opening zip file at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.(ZipFile.java:225) at java.util.zip.ZipFile.(ZipFile.java:155) at java.util.zip.ZipFile.(ZipFile.java:169) at org.gradle.wrapper.Install.unzip(Install.java:157) at org.gradle.wrapper.Install.access$400(Install.java:26) at org.gradle.wrapper.Install$1.call(Install.java:67) at org.gradle.wrapper.Install$1.call(Install.java:44) at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65) 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) INFO: STDERR:
cd /home/joshua/Documents/myProjects/firstapp/.buildozer/android/platform/build/dists/myapp && /home/joshua/Documents/myProjects/firstapp/.buildozer/android/platform/build/dists/myapp/gradlew assembleDebug
[WARNING]: ERROR: /home/joshua/Documents/myProjects/firstapp/.buildozer/android/platform/build/dists/myapp/gradlew failed! WARNING: Received a --sdk argument, but this argument is deprecated and does nothing. No compiled python is present to zip, skipping. No setup.py/pyproject.toml used, copying full private data into .apk. Applying Java source code patches... Applying patch: src/patches/SDLActivity.java.patch Warning: failed to apply patch (exit code 1), assuming it is already applied: src/patches/SDLActivity.java.patch
Command failed: /home/joshua/anaconda3/bin/python -m pythonforandroid.toolchain apk --debug --bootstrap=sdl2 --dist_name myapp --name 'My Application' --version 0.1 --package org.test.myapp --android_api 27 --minsdk 21 --ndk-api 21 --private /home/joshua/Documents/myProjects/firstapp/.buildozer/android/app --orientation portrait --window --copy-libs --arch armeabi-v7a --color=always --storage-dir="/home/joshua/Documents/myProjects/firstapp/.buildozer/android/platform/build" --ndk-api=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
somebody to help me, still the error exists a almost five months now I can't move on with my project
Delete your .gradle folder in your home directory. It is probably corrupted. Run the command again. Worked for me.
Delete the .gradle
folder in your home directory. Once u do this run the command again, then the buildozer will download the Gradle once again and the app will be built without any problems.
Try to run this command: sudo rm -rf ~/.gradle
I have faced the similar error.
Compiling '/home/TERRA/PythonExp/kivy_exp/new_jeans_v6_py3/.buildozer/android/app/sitecustomize.py'...
Compiling '/home/TERRA/PythonExp/kivy_exp/new_jeans_v6_py3/.buildozer/android/app/zipper.py'...
[INFO]: Detected highest available build tools version to be 34.0.0
[DEBUG]: -> running gradlew clean assembleDebug
[DEBUG]:
[DEBUG]: FAILURE: Build failed with an exception.
[DEBUG]:
[DEBUG]: * Where:
[DEBUG]: Build file '/home/TERRA/PythonExp/kivy_exp/new_jeans_v6_py3/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/NewJeans_py3_App/build.gradle' line: 23
[DEBUG]:
[DEBUG]: * What went wrong:
[DEBUG]: A problem occurred evaluating root project 'NewJeans_py3_App'.
[DEBUG]: > Failed to apply plugin 'com.android.internal.application'.
[DEBUG]: > Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8.
[DEBUG]: You can try some of the following options:
[DEBUG]: - changing the IDE settings.
[DEBUG]: - changing the JAVA_HOME environment variable.
[DEBUG]: - changing `org.gradle.java.home` in `gradle.properties`.
[DEBUG]:
[DEBUG]: * Try:
[DEBUG]: > Run with --stacktrace option to get the stack trace.
[DEBUG]: > Run with --info or --debug option to get more log output.
[DEBUG]: > Run with --scan to get full insights.
[DEBUG]:
[DEBUG]: * Get more help at https://help.gradle.org
[DEBUG]:
[DEBUG]: Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
[DEBUG]:
[DEBUG]: You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
[DEBUG]:
[DEBUG]: See https://docs.gradle.org/7.4.1/userguide/command_line_interface.html#sec:command_line_warnings
[DEBUG]:
[DEBUG]: BUILD FAILED in 648ms
[DEBUG]:
[DEBUG]:
Exception in thread background thread for pid 173974:
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/sergen/.local/lib/python3.8/site-packages/sh.py", line 1637, in wrap
fn(*rgs, **kwargs)
File "/home/sergen/.local/lib/python3.8/site-packages/sh.py", line 2561, in background_thread
handle_exit_code(exit_code)
File "/home/sergen/.local/lib/python3.8/site-packages/sh.py", line 2265, in fn
return self.command.handle_command_exit_code(exit_code)
File "/home/sergen/.local/lib/python3.8/site-packages/sh.py", line 865, in handle_command_exit_code
raise exc
sh.ErrorReturnCode_1:
RAN: /home/TERRA/PythonExp/kivy_exp/new_jeans_v6_py3/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/NewJeans_py3_App/gradlew clean assembleDebug
STDOUT:
FAILURE: Build failed with an exception.
* Where:
Build file '/home/TERRA/PythonExp/kivy_exp/new_jeans_v6_py3/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/NewJeans_py3_App/build.gradle' line: 23
* What went wrong:
A problem occurred evaluating root project 'NewJeans_py3_App'.
> Failed to apply plugin 'com.android.internal.application'.
> Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8.
You can try some of the following options:
- changing the IDE settings.
- changing the JAVA_HOME environment variable.
- changing `org.gradle.java.home` in `gradle.properties`.
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.4.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 648ms
[INFO]: STDOUT (last 20 lines of 34):
[DEBUG]: - changing the JAVA_HOME environment variable.
- changing `org.gradle.java.home` in `gradle.properties`.
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.4.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 648ms
[INFO]: STDERR:
[INFO]: ENV:
export SHELL='/bin/bash'
export SESSION_MANAGER='local/sergen:@/tmp/.ICE-unix/2036,unix/sergen:/tmp/.ICE-unix/2036'
export QT_ACCESSIBILITY='1'
export COLORTERM='truecolor'
export XDG_CONFIG_DIRS='/etc/xdg/xdg-cinnamon:/etc/xdg'
export XDG_SESSION_PATH='/org/freedesktop/DisplayManager/Session0'
export GNOME_DESKTOP_SESSION_ID='this-is-deprecated'
export LANGUAGE='ru_RU'
export SSH_AUTH_SOCK='/run/user/1000/keyring/ssh'
export CINNAMON_VERSION='4.8.6'
export DESKTOP_SESSION='cinnamon'
export SSH_AGENT_PID='2165'
export GTK_MODULES='gail:atk-bridge'
export XDG_SEAT='seat0'
export PWD='/home/TERRA/PythonExp/kivy_exp/new_jeans_v6_py3'
export LOGNAME='sergen'
export XDG_SESSION_DESKTOP='cinnamon'
export QT_QPA_PLATFORMTHEME='qt5ct'
export XDG_SESSION_TYPE='x11'
export GPG_AGENT_INFO='/run/user/1000/gnupg/S.gpg-agent:0:1'
export XAUTHORITY='/home/sergen/.Xauthority'
export XDG_GREETER_DATA_DIR='/var/lib/lightdm-data/sergen'
export GJS_DEBUG_TOPICS='JS ERROR;JS LOG'
export GDM_LANG='ru_RU'
export HOME='/home/sergen'
export LANG='ru_RU.UTF-8'
export XDG_CURRENT_DESKTOP='X-Cinnamon'
export VTE_VERSION='6003'
export XDG_SEAT_PATH='/org/freedesktop/DisplayManager/Seat0'
export GNOME_TERMINAL_SCREEN='/org/gnome/Terminal/screen/acf2d08a_809b_4e75_85e7_d56577cd54cd'
export GJS_DEBUG_OUTPUT='stderr'
export XDG_SESSION_CLASS='user'
export TERM='xterm-256color'
export GTK_OVERLAY_SCROLLING='1'
export USER='sergen'
export GNOME_TERMINAL_SERVICE=':1.82'
export DISPLAY=':0'
export SHLVL='1'
export XDG_VTNR='7'
export XDG_SESSION_ID='c2'
export XDG_RUNTIME_DIR='/run/user/1000'
export GTK3_MODULES='xapp-gtk3-module'
export XDG_DATA_DIRS='/usr/share/cinnamon:/usr/share/gnome:/home/sergen/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share'
export PATH='/home/sergen/.buildozer/android/platform/apache-ant-1.9.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/sergen/.local/bin/'
export GDMSESSION='cinnamon'
export DBUS_SESSION_BUS_ADDRESS='unix:path=/run/user/1000/bus'
export OLDPWD='/home/TERRA/Android/python-for-android'
export _='/home/sergen/.local/bin/buildozer'
export PACKAGES_PATH='/home/sergen/.buildozer/android/packages'
export ANDROIDSDK='/home/sergen/.buildozer/android/platform/android-sdk'
export ANDROIDNDK='/home/sergen/.buildozer/android/platform/android-ndk-r25b'
export ANDROIDAPI='26'
export ANDROIDMINAPI='21'
export PLAT='linux-x86_64'
export ANDROID_NDK_HOME='/home/sergen/.buildozer/android/platform/android-ndk-r25b'
export ANDROID_HOME='/home/sergen/.buildozer/android/platform/android-sdk'
[INFO]: COMMAND:
cd /home/TERRA/PythonExp/kivy_exp/new_jeans_v6_py3/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/NewJeans_py3_App && /home/TERRA/PythonExp/kivy_exp/new_jeans_v6_py3/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/NewJeans_py3_App/gradlew clean assembleDebug
[WARNING]: ERROR: /home/TERRA/PythonExp/kivy_exp/new_jeans_v6_py3/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/NewJeans_py3_App/gradlew failed!
No setup.py/pyproject.toml used, copying full private data into .apk.
Applying Java source code patches...
Applying patch: src/patches/SDLActivity.java.patch
Warning: failed to apply patch (exit code 1), assuming it is already applied: src/patches/SDLActivity.java.patch
# Command failed: ['/usr/bin/python3', '-m', 'pythonforandroid.toolchain', 'apk', '--bootstrap', 'sdl2', '--dist_name', 'NewJeans_py3_App', '--name', 'NewJeans_6_py3', '--version', '7', '--package', 'org.new_jeans_xml.newjeans_py3_app', '--minsdk', '21', '--ndk-api', '21', '--private', '/home/TERRA/PythonExp/kivy_exp/new_jeans_v6_py3/.buildozer/android/app', '--permission', 'android.permission.WRITE_EXTERNAL_STORAGE', '--permission', 'android.permission.READ_EXTERNAL_STORAGE', '--permission', 'android.permission.WAKE_LOCK', '--android-entrypoint', 'org.kivy.android.PythonActivity', '--android-apptheme', '@android:style/Theme.NoTitleBar', '--orientation', 'portrait', '--wakelock', '--copy-libs', '--arch', 'arm64-v8a', '--arch', 'armeabi-v7a', '--color=always', '--storage-dir=/home/TERRA/PythonExp/kivy_exp/new_jeans_v6_py3/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a', '--ndk-api=21', '--ignore-setup-py', '--debug']
# ENVIRONMENT:
# SHELL = '/bin/bash'
# SESSION_MANAGER = 'local/sergen:@/tmp/.ICE-unix/2036,unix/sergen:/tmp/.ICE-unix/2036'
# QT_ACCESSIBILITY = '1'
# COLORTERM = 'truecolor'
# XDG_CONFIG_DIRS = '/etc/xdg/xdg-cinnamon:/etc/xdg'
# XDG_SESSION_PATH = '/org/freedesktop/DisplayManager/Session0'
# GNOME_DESKTOP_SESSION_ID = 'this-is-deprecated'
# LANGUAGE = 'ru_RU'
# SSH_AUTH_SOCK = '/run/user/1000/keyring/ssh'
# CINNAMON_VERSION = '4.8.6'
# DESKTOP_SESSION = 'cinnamon'
# SSH_AGENT_PID = '2165'
# GTK_MODULES = 'gail:atk-bridge'
# XDG_SEAT = 'seat0'
# PWD = '/home/TERRA/PythonExp/kivy_exp/new_jeans_v6_py3'
# LOGNAME = 'sergen'
# XDG_SESSION_DESKTOP = 'cinnamon'
# QT_QPA_PLATFORMTHEME = 'qt5ct'
# XDG_SESSION_TYPE = 'x11'
# GPG_AGENT_INFO = '/run/user/1000/gnupg/S.gpg-agent:0:1'
# XAUTHORITY = '/home/sergen/.Xauthority'
# XDG_GREETER_DATA_DIR = '/var/lib/lightdm-data/sergen'
# GJS_DEBUG_TOPICS = 'JS ERROR;JS LOG'
# GDM_LANG = 'ru_RU'
# HOME = '/home/sergen'
# LANG = 'ru_RU.UTF-8'
# XDG_CURRENT_DESKTOP = 'X-Cinnamon'
# VTE_VERSION = '6003'
# XDG_SEAT_PATH = '/org/freedesktop/DisplayManager/Seat0'
# GNOME_TERMINAL_SCREEN = '/org/gnome/Terminal/screen/acf2d08a_809b_4e75_85e7_d56577cd54cd'
# GJS_DEBUG_OUTPUT = 'stderr'
# XDG_SESSION_CLASS = 'user'
# TERM = 'xterm-256color'
# GTK_OVERLAY_SCROLLING = '1'
# USER = 'sergen'
# GNOME_TERMINAL_SERVICE = ':1.82'
# DISPLAY = ':0'
# SHLVL = '1'
# XDG_VTNR = '7'
# XDG_SESSION_ID = 'c2'
# XDG_RUNTIME_DIR = '/run/user/1000'
# GTK3_MODULES = 'xapp-gtk3-module'
# XDG_DATA_DIRS = '/usr/share/cinnamon:/usr/share/gnome:/home/sergen/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share'
# PATH = '/home/sergen/.buildozer/android/platform/apache-ant-1.9.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/sergen/.local/bin/'
# GDMSESSION = 'cinnamon'
# DBUS_SESSION_BUS_ADDRESS = 'unix:path=/run/user/1000/bus'
# OLDPWD = '/home/TERRA/Android/python-for-android'
# _ = '/home/sergen/.local/bin/buildozer'
# PACKAGES_PATH = '/home/sergen/.buildozer/android/packages'
# ANDROIDSDK = '/home/sergen/.buildozer/android/platform/android-sdk'
# ANDROIDNDK = '/home/sergen/.buildozer/android/platform/android-ndk-r25b'
# ANDROIDAPI = '26'
# 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
Can anybody to explain the meaning of the backtrace and to suggest the reason of the error?
I tried to delete the .gradle
folder but the error appeared again.
Linux mint 20.1 Buildozer 1.5.0 java version "1.8.0_271" Java(TM) SE Runtime Environment (build 1.8.0_271-b09) Java HotSpot(TM) 64-Bit Server VM (build 25.271-b09, mixed mode) javac 14.0.2 p4a 2023.05.21
I think you need to choose only one target architecture in your buildozer.spec "android.archs=armeabi-v7a #arm64-v8a ,armeabi-v7a, x86"
I think you need to choose only one target architecture in your buildozer.spec "android.archs=armeabi-v7a #arm64-v8a ,armeabi-v7a, x86"
I don't think it is the problem because it is sad in the spec's comments:
# (list) The Android archs to build for, choices: armeabi-v7a, arm64-v8a, x86, x86_64
# In past, was `android.arch` as we weren't supporting builds for multiple archs at the same time.
But I have tryed to chose only one arch: "armeabi-v7a" . The error didn`t change.
The stack sad that Gradle needs Java 11 instead Java 1.8 . The worst thing is that I build my applet successfully several years ago. Today I need to refresh it, but the new software versions don't allow it. Is it possible to chose the version of Gradle to use for building an app? And maybe it is possible to download old version of Gradle and use it long time?
I have solved my problem:
- installed Open JDK11 from repository
- setted up java paths ( https://tutorialforlinux.com/2023/07/29/oracle-jdk-20-linux-mint-installation-step-by-step/2/ )
- cleared buildozer cash
- rebuild my app
As now described in docs, OpenJDK 11 (or newer) is a requirement.
Closing the issue, and locking the thread as is outdated.