buildozer gradle error

211 views
Skip to first unread message

Degenerate Tech

unread,
Dec 30, 2023, 6:48:56 AM12/30/23
to Kivy users support
python 3.10
openjdk 11
buildozer 1.5.0
kivy 2.0.0
cython 0.29.33


[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/sahil/app_ui/.buildozer/android/platform/build-arm64-v8a/dists/kivymdui/build.gradle' line: 75
[DEBUG]:  
[DEBUG]:   * What went wrong:
[DEBUG]:   Could not compile build file '/home/sahil/app_ui/.buildozer/android/platform/build-arm64-v8a/dists/kivymdui/build.gradle'.
[DEBUG]:   > startup failed:
[DEBUG]:     build file '/home/sahil/app_ui/.buildozer/android/platform/build-arm64-v8a/dists/kivymdui/build.gradle': 75: Unexpected input: '{' @ line 75, column 14.
[DEBUG]:        dependencies {
[DEBUG]:                     ^
[DEBUG]:  
[DEBUG]:     1 error
[DEBUG]:  
[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]:   BUILD FAILED in 655ms
[DEBUG]:  
Exception in thread background thread for pid 112285:
Traceback (most recent call last):
  File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.10/threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "/home/sahil/.local/lib/python3.10/site-packages/sh.py", line 1641, in wrap
    fn(*rgs, **kwargs)
  File "/home/sahil/.local/lib/python3.10/site-packages/sh.py", line 2569, in background_thread
    handle_exit_code(exit_code)
  File "/home/sahil/.local/lib/python3.10/site-packages/sh.py", line 2269, in fn
    return self.command.handle_command_exit_code(exit_code)
  File "/home/sahil/.local/lib/python3.10/site-packages/sh.py", line 869, in handle_command_exit_code
    raise exc
sh.ErrorReturnCode_1:

  RAN: /home/sahil/app_ui/.buildozer/android/platform/build-arm64-v8a/dists/kivymdui/gradlew clean assembleDebug

  STDOUT:

FAILURE: Build failed with an exception.

* Where:
Build file '/home/sahil/app_ui/.buildozer/android/platform/build-arm64-v8a/dists/kivymdui/build.gradle' line: 75

* What went wrong:
Could not compile build file '/home/sahil/app_ui/.buildozer/android/platform/build-arm64-v8a/dists/kivymdui/build.gradle'.
> startup failed:
  build file '/home/sahil/app_ui/.buildozer/android/platform/build-arm64-v8a/dists/kivymdui/build.gradle': 75: Unexpected input: '{' @ line 75, column 14.
     dependencies {
                  ^
 
  1 error


* 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 655ms



  STDERR:

[INFO]:    STDOUT (last 20 lines of 27):
* What went wrong:
Could not compile build file '/home/sahil/app_ui/.buildozer/android/platform/build-arm64-v8a/dists/kivymdui/build.gradle'.
> startup failed:
  build file '/home/sahil/app_ui/.buildozer/android/platform/build-arm64-v8a/dists/kivymdui/build.gradle': 75: Unexpected input: '{' @ line 75, column 14.
     dependencies {
                  ^
 
  1 error


* 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 655ms

[INFO]:    STDERR:

[INFO]:    ENV:
export SHELL='/bin/bash'
export SESSION_MANAGER='local/sahil-ASUS-TUF:@/tmp/.ICE-unix/2202,unix/sahil-ASUS-TUF:/tmp/.ICE-unix/2202'
export QT_ACCESSIBILITY='1'
export COLORTERM='truecolor'
export XDG_CONFIG_DIRS='/etc/xdg/xdg-ubuntu:/etc/xdg'
export SSH_AGENT_LAUNCHER='gnome-keyring'
export XDG_MENU_PREFIX='gnome-'
export GNOME_DESKTOP_SESSION_ID='this-is-deprecated'
export LANGUAGE='en_IN:en'
export GNOME_SHELL_SESSION_MODE='ubuntu'
export iraf='/home/sahil/iraf-2.17/'
export SSH_AUTH_SOCK='/run/user/1000/keyring/ssh'
export XMODIFIERS='@im=ibus'
export DESKTOP_SESSION='ubuntu'
export GTK_MODULES='gail:atk-bridge'
export DBUS_STARTER_BUS_TYPE='session'
export PWD='/home/sahil/app_ui'
export LOGNAME='sahil'
export XDG_SESSION_DESKTOP='ubuntu'
export XDG_SESSION_TYPE='wayland'
export IRAFARCH='linux64'
export SYSTEMD_EXEC_PID='2202'
export XAUTHORITY='/run/user/1000/.mutter-Xwaylandauth.O4AOG2'
export HOME='/home/sahil'
export USERNAME='sahil'
export IM_CONFIG_PHASE='1'
export LANG='en_IN'
export 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:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=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:*.opus=00;36:*.spx=00;36:*.xspf=00;36:'
export XDG_CURRENT_DESKTOP='ubuntu:GNOME'
export VTE_VERSION='6800'
export WAYLAND_DISPLAY='wayland-0'
export GNOME_TERMINAL_SCREEN='/org/gnome/Terminal/screen/70b70542_0a20_4b3f_b0fd_c8bf7edd3ebb'
export GNOME_SETUP_DISPLAY=':1'
export LESSCLOSE='/usr/bin/lesspipe %s %s'
export XDG_SESSION_CLASS='user'
export TERM='xterm-256color'
export LESSOPEN='| /usr/bin/lesspipe %s'
export USER='sahil'
export GNOME_TERMINAL_SERVICE=':1.122'
export DISPLAY=':0'
export SHLVL='1'
export QT_IM_MODULE='ibus'
export DBUS_STARTER_ADDRESS='unix:path=/run/user/1000/bus,guid=861d131e463c1404e718216f658feff9'
export XDG_RUNTIME_DIR='/run/user/1000'
export XDG_DATA_DIRS='/usr/share/ubuntu:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop'
export PATH='/home/sahil/.buildozer/android/platform/apache-ant-1.9.4/bin:/home/sahil/.local/bin/:/home/sahil/iraf-2.17/bin/:/home/sahil/.iraf/bin:/home/sahil/.iraf/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin'
export GDMSESSION='ubuntu'
export DBUS_SESSION_BUS_ADDRESS='unix:path=/run/user/1000/bus,guid=861d131e463c1404e718216f658feff9'
export _='/home/sahil/.local/bin/buildozer'
export PACKAGES_PATH='/home/sahil/.buildozer/android/packages'
export ANDROIDSDK='/home/sahil/.buildozer/android/platform/android-sdk'
export ANDROIDNDK='/home/sahil/.buildozer/android/platform/android-ndk-r25b'
export ANDROIDAPI='30'
export ANDROIDMINAPI='21'
export ANDROID_NDK_HOME='/home/sahil/.buildozer/android/platform/android-ndk-r25b'
export ANDROID_HOME='/home/sahil/.buildozer/android/platform/android-sdk'

[INFO]:    COMMAND:
cd /home/sahil/app_ui/.buildozer/android/platform/build-arm64-v8a/dists/kivymdui && /home/sahil/app_ui/.buildozer/android/platform/build-arm64-v8a/dists/kivymdui/gradlew clean assembleDebug

[WARNING]: ERROR: /home/sahil/app_ui/.buildozer/android/platform/build-arm64-v8a/dists/kivymdui/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
# Command failed: ['/usr/bin/python3', '-m', 'pythonforandroid.toolchain', 'apk', '--bootstrap', 'sdl2', '--dist_name', 'kivymdui', '--name', 'Kivymd UI', '--version', '0.3', '--package', 'org.quanta.kivymdui', '--minsdk', '21', '--ndk-api', '21', '--private', '/home/sahil/app_ui/.buildozer/android/app', '--permission', 'INTERNET', '--permission', 'ACCESS_NETWORK_STATE', '--android-entrypoint', 'org.kivy.android.PythonActivity', '--android-apptheme', '@android:style/Theme.NoTitleBar', '--meta-data', 'com.google.android.gms.ads.APPLICATION_ID=ca-app-pub-3940256099942544~3347511713', '--icon', '/home/sahil/app_ui/./icon512.png', '--orientation', 'portrait', '--enable-androidx', '--copy-libs', '--depend', "'com.google.firebase:firebase-ads:10.2.0'", '--arch', 'arm64-v8a', '--color=always', '--storage-dir=/home/sahil/app_ui/.buildozer/android/platform/build-arm64-v8a', '--ndk-api=21', '--ignore-setup-py', '--debug']
# ENVIRONMENT:
#     SHELL = '/bin/bash'
#     SESSION_MANAGER = 'local/sahil-ASUS-TUF:@/tmp/.ICE-unix/2202,unix/sahil-ASUS-TUF:/tmp/.ICE-unix/2202'
#     QT_ACCESSIBILITY = '1'
#     COLORTERM = 'truecolor'
#     XDG_CONFIG_DIRS = '/etc/xdg/xdg-ubuntu:/etc/xdg'
#     SSH_AGENT_LAUNCHER = 'gnome-keyring'
#     XDG_MENU_PREFIX = 'gnome-'
#     GNOME_DESKTOP_SESSION_ID = 'this-is-deprecated'
#     LANGUAGE = 'en_IN:en'
#     GNOME_SHELL_SESSION_MODE = 'ubuntu'
#     iraf = '/home/sahil/iraf-2.17/'
#     SSH_AUTH_SOCK = '/run/user/1000/keyring/ssh'
#     XMODIFIERS = '@im=ibus'
#     DESKTOP_SESSION = 'ubuntu'
#     GTK_MODULES = 'gail:atk-bridge'
#     DBUS_STARTER_BUS_TYPE = 'session'
#     PWD = '/home/sahil/app_ui'
#     LOGNAME = 'sahil'
#     XDG_SESSION_DESKTOP = 'ubuntu'
#     XDG_SESSION_TYPE = 'wayland'
#     IRAFARCH = 'linux64'
#     SYSTEMD_EXEC_PID = '2202'
#     XAUTHORITY = '/run/user/1000/.mutter-Xwaylandauth.O4AOG2'
#     HOME = '/home/sahil'
#     USERNAME = 'sahil'
#     IM_CONFIG_PHASE = '1'
#     LANG = 'en_IN'
#     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:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=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:*.opus=00;36:*.spx=00;36:*.xspf=00;36:'
#     XDG_CURRENT_DESKTOP = 'ubuntu:GNOME'
#     VTE_VERSION = '6800'
#     WAYLAND_DISPLAY = 'wayland-0'
#     GNOME_TERMINAL_SCREEN = '/org/gnome/Terminal/screen/70b70542_0a20_4b3f_b0fd_c8bf7edd3ebb'
#     GNOME_SETUP_DISPLAY = ':1'
#     LESSCLOSE = '/usr/bin/lesspipe %s %s'
#     XDG_SESSION_CLASS = 'user'
#     TERM = 'xterm-256color'
#     LESSOPEN = '| /usr/bin/lesspipe %s'
#     USER = 'sahil'
#     GNOME_TERMINAL_SERVICE = ':1.122'
#     DISPLAY = ':0'
#     SHLVL = '1'
#     QT_IM_MODULE = 'ibus'
#     DBUS_STARTER_ADDRESS = 'unix:path=/run/user/1000/bus,guid=861d131e463c1404e718216f658feff9'
#     XDG_RUNTIME_DIR = '/run/user/1000'
#     XDG_DATA_DIRS = '/usr/share/ubuntu:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop'
#     PATH = '/home/sahil/.buildozer/android/platform/apache-ant-1.9.4/bin:/home/sahil/.local/bin/:/home/sahil/iraf-2.17/bin/:/home/sahil/.iraf/bin:/home/sahil/.iraf/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin'
#     GDMSESSION = 'ubuntu'
#     DBUS_SESSION_BUS_ADDRESS = 'unix:path=/run/user/1000/bus,guid=861d131e463c1404e718216f658feff9'
#     _ = '/home/sahil/.local/bin/buildozer'
#     PACKAGES_PATH = '/home/sahil/.buildozer/android/packages'
#     ANDROIDSDK = '/home/sahil/.buildozer/android/platform/android-sdk'
#     ANDROIDNDK = '/home/sahil/.buildozer/android/platform/android-ndk-r25b'
#     ANDROIDAPI = '30'
#     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.

ElliotG

unread,
Dec 31, 2023, 3:01:49 PM12/31/23
to Kivy users support
You might want to try the Discord, there is an area focused on Kivy and Android.  https://discord.com/invite/eT3cuQp

Vishak Raj

unread,
Nov 8, 2024, 8:50:44 AM11/8/24
to Kivy users support
Hi, Today i faced this issue

in buildozer.spec, I gave this value
android.gradle_dependencies = 'org.tensorflow:tensorflow-lite:1.12.0','org.tensorflow:tensorflow-lite-support:0.0.0-nightly'

after that i build the app using "buildozer android debug deploy run"

then i got this exact error, so when i check the build.gradle, in that 75th line - 

dependencies {
    implementation ''org.tensorflow:tensorflow-lite:1.12.0''
    implementation ''org.tensorflow:tensorflow-lite-support:0.0.0-nightly''
   
}

while checking these line, there is two single quote symbole (') is placed, so, in the buildozer.spec, I removed the quotes then this error is solved
like this 
android.gradle_dependencies = org.tensorflow:tensorflow-lite:1.12.0,org.tensorflow:tensorflow-lite-support:0.0.0-nightly
*without quotes*

Happy Coding :-)

Reply all
Reply to author
Forward
0 new messages