Closed codinghedgehog-python closed 11 months ago
Don't know if it is the cause of this issue, but opencv-python is a Linux package. I would have expected using this to create a run time error. You presumably want the opencv recipe, replace opencv-python with opencv. Do a buildozer appclean before the build.
Again I don't know if this is the cause of your issue, but by the look of it pytesseract runs an external executable. This will be an issue on Android.
Support questions are best directed to the Google group. For best results show a small example of your issue, keep your questions small and specific.
Hi Robert,
I've done as you advised. I've also noticed #1144 has very similar issue and seems to be unresolved by far. Below is the traceback I'm getting after following the workaround.
/home/mark/front_end_android/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py:84: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
import imp
[INFO]: Will compile for the following archs: armeabi-v7a
[INFO]: Found Android API target in $ANDROIDAPI: 27
Traceback (most recent call last):
File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/mark/front_end_android/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1260, in <module>
main()
File "/home/mark/front_end_android/.buildozer/android/platform/python-for-android/pythonforandroid/entrypoints.py", line 18, in main
ToolchainCL()
File "/home/mark/front_end_android/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 709, in __init__
getattr(self, command)(args)
File "/home/mark/front_end_android/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 147, in wrapper_func
user_ndk_api=self.ndk_api)
File "/home/mark/front_end_android/.buildozer/android/platform/python-for-android/pythonforandroid/build.py", line 300, in prepare_build_environment
apis = get_available_apis(self.sdk_dir)
File "/home/mark/front_end_android/.buildozer/android/platform/python-for-android/pythonforandroid/build.py", line 74, in get_available_apis
targets = get_targets(sdk_dir)
File "/home/mark/front_end_android/.buildozer/android/platform/python-for-android/pythonforandroid/build.py", line 62, in get_targets
targets = avdmanager('list', 'target').stdout.decode('utf-8').split('\n')
File "/home/mark/front_end_android/venv/lib/python3.7/site-packages/sh.py", line 1516, in __call__
return RunningCommand(cmd, call_args, stdin, stdout, stderr)
File "/home/mark/front_end_android/venv/lib/python3.7/site-packages/sh.py", line 780, in __init__
self.wait()
File "/home/mark/front_end_android/venv/lib/python3.7/site-packages/sh.py", line 837, in wait
self.handle_command_exit_code(exit_code)
File "/home/mark/front_end_android/venv/lib/python3.7/site-packages/sh.py", line 861, in handle_command_exit_code
raise exc
sh.ErrorReturnCode_1:
RAN: /home/mark/.buildozer/android/platform/android-sdk/tools/bin/avdmanager list target
STDOUT:
STDERR:
Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema
at com.android.repository.api.SchemaModule$SchemaModuleVersion.<init>(SchemaModule.java:156)
at com.android.repository.api.SchemaModule.<init>(SchemaModule.java:75)
at com.android.sdklib.repository.AndroidSdkHandler.<clinit>(AndroidSdkHandler.java:81)
at com.android.sdklib.tool.AvdManagerCli.run(AvdManagerCli.java:213)
at com.android.sdklib.tool.AvdManagerCli.main(AvdManagerCli.java:200)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
... 5 more
# Command failed: /home/mark/front_end_android/venv/bin/python -m pythonforandroid.toolchain create --dist_name=kivyandroid --bootstrap=sdl2 --requirements=python3,kivy,kivy_garden.xcamera,pytesseract,opencv,imutils,numpy,plyer,chardet,idna,urllib3,android,requests --arch armeabi-v7a --copy-libs --color=always --storage-dir="/home/mark/front_end_android/.buildozer/android/platform/build-armeabi-v7a" --ndk-api=21
# ENVIRONMENT:
# SHELL = '/bin/bash'
# SESSION_MANAGER = 'local/ubuntu:@/tmp/.ICE-unix/1997,unix/ubuntu:/tmp/.ICE-unix/1997'
# QT_ACCESSIBILITY = '1'
# COLORTERM = 'truecolor'
# XDG_CONFIG_DIRS = '/etc/xdg/xdg-ubuntu:/etc/xdg'
# XDG_MENU_PREFIX = 'gnome-'
# GNOME_DESKTOP_SESSION_ID = 'this-is-deprecated'
# LANGUAGE = 'en_GB:en'
# MANDATORY_PATH = '/usr/share/gconf/ubuntu.mandatory.path'
# GNOME_SHELL_SESSION_MODE = 'ubuntu'
# SSH_AUTH_SOCK = '/run/user/1000/keyring/ssh'
# XMODIFIERS = '@im=ibus'
# DESKTOP_SESSION = 'ubuntu'
# SSH_AGENT_PID = '1939'
# GTK_MODULES = 'gail:atk-bridge'
# PWD = '/home/mark/front_end_android'
# LOGNAME = 'mark'
# XDG_SESSION_DESKTOP = 'ubuntu'
# XDG_SESSION_TYPE = 'x11'
# GPG_AGENT_INFO = '/run/user/1000/gnupg/S.gpg-agent:0:1'
# XAUTHORITY = '/run/user/1000/gdm/Xauthority'
# WINDOWPATH = '2'
# HOME = '/home/mark'
# USERNAME = 'mark'
# IM_CONFIG_PHASE = '1'
# LANG = 'en_GB.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:*.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'
# VIRTUAL_ENV = '/home/mark/front_end_android/venv'
# VTE_VERSION = '6003'
# GNOME_TERMINAL_SCREEN = '/org/gnome/Terminal/screen/203175f9_bafc_4249_ba99_21f737e0a54a'
# INVOCATION_ID = 'c720b24e9bbf4867b81fb7df84836c20'
# MANAGERPID = '1753'
# LESSCLOSE = '/usr/bin/lesspipe %s %s'
# XDG_SESSION_CLASS = 'user'
# TERM = 'xterm-256color'
# DEFAULTS_PATH = '/usr/share/gconf/ubuntu.default.path'
# LESSOPEN = '| /usr/bin/lesspipe %s'
# USER = 'mark'
# GNOME_TERMINAL_SERVICE = ':1.132'
# DISPLAY = ':0'
# SHLVL = '1'
# QT_IM_MODULE = 'ibus'
# XDG_RUNTIME_DIR = '/run/user/1000'
# PS1 = ('(venv) \\[\\e]0;\\u@\\h: '
'\\w\\a\\]${debian_chroot:+($debian_chroot)}\\[\\033[01;32m\\]\\u@\\h\\[\\033[00m\\]:\\[\\033[01;34m\\]\\w\\[\\033[00m\\]\\$ ')
# JOURNAL_STREAM = '9:43930'
# XDG_DATA_DIRS = '/usr/share/ubuntu:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop'
# PATH = '/home/mark/.buildozer/android/platform/apache-ant-1.9.4/bin:/home/mark/front_end_android/venv/bin:/home/mark/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin'
# GDMSESSION = 'ubuntu'
# DBUS_SESSION_BUS_ADDRESS = 'unix:path=/run/user/1000/bus'
# OLDPWD = '/home/mark'
# _ = '/home/mark/front_end_android/venv/bin/buildozer'
# PACKAGES_PATH = '/home/mark/.buildozer/android/packages'
# ANDROIDSDK = '/home/mark/.buildozer/android/platform/android-sdk'
# ANDROIDNDK = '/home/mark/.buildozer/android/platform/android-ndk-r19c'
# 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
https://buildozer.readthedocs.io/en/latest/installation.html
Check the jdk version installed.
Support questions are best directed to the Google group. For best results show a small example of your issue, keep your questions small and specific.
Any further usage questions use the user group https://groups.google.com/g/kivy-users This forum is for developer issues.
I'm running openjdk 13
The topic is live there https://groups.google.com/g/kivy-users/c/Ysz8ULTazXo
👋 @codinghedgehog-python, we use the issue tracker exclusively for bug reports and feature requests. However, this issue appears to be a support request. Please use our support channels to get help with the project. Let us know if this comment was made in error, and we'll be happy to reopen the issue.
Versions
Description
I'm compiling my Kivy app for Android. Instead of having opening app on the phone I got the traceback below. Running
buildozer android clean
didn't help on this occasion.buildozer.spec
Command:
Spec file:
Logs