Closed shuaiegg closed 2 years ago
👋 @shuaiegg, 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.
Sorry if is this is not the right place to post it but the solution is very simple, if somebody else gets the same issue then,
in buildozer.spec
change this: android.arch = armeabi-v7a
to this: android.arch = arm64-v8a
Versions
Description
// REPLACE ME: I new to kivy ,using a virtual environment to generate a apk .happen when compile ,logs below. seems something wrong with my venv.I don't know how to solve this problem,plz help
buildozer.spec
Command:
Spec file:
Logs
If this fails, it may mean that the module has compiled components and needs a recipe. [INFO]: -> directory context /Users/apple/Desktop/kivys/myapp/tutors/2/.buildozer/android/platform/build-armeabi-v7a/build [INFO]: -> running python3 -m venv venv working: Error: Command '['/Users/apple/Desktop/kivys/myapp/tutors/2/.buildoz...(and 146 more) Exception in thread background thread for pid 51375: Traceback (most recent call last): File "/usr/local/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/threading.py", line 973, in _bootstrap_inner self.run() File "/usr/local/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/threading.py", line 910, in run self._target(*self._args, *self._kwargs) File "/usr/local/lib/python3.9/site-packages/sh.py", line 1683, in wrap fn(rgs, **kwargs) File "/usr/local/lib/python3.9/site-packages/sh.py", line 2662, in background_thread handle_exit_code(exit_code) File "/usr/local/lib/python3.9/site-packages/sh.py", line 2349, in fn return self.command.handle_command_exit_code(exit_code) File "/usr/local/lib/python3.9/site-packages/sh.py", line 905, in handle_command_exit_code raise exc sh.ErrorReturnCode_1:
RAN: /Users/apple/Desktop/kivys/myapp/tutors/2/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build/python3 -m venv venv
STDOUT: Error: Command '['/Users/apple/Desktop/kivys/myapp/tutors/2/.buildozer/android/platform/build-armeabi-v7a/build/venv/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.
STDERR:
Traceback (most recent call last):
main()
File "/Users/apple/Desktop/kivys/myapp/tutors/2/.buildozer/android/platform/python-for-android/pythonforandroid/entrypoints.py", line 18, in main
ToolchainCL()
File "/Users/apple/Desktop/kivys/myapp/tutors/2/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 725, in init
getattr(self, command)(args)
File "/Users/apple/Desktop/kivys/myapp/tutors/2/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 153, in wrapper_func
build_dist_from_args(ctx, dist, args)
File "/Users/apple/Desktop/kivys/myapp/tutors/2/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 212, in build_dist_from_args
build_recipes(build_order, python_modules, ctx,
File "/Users/apple/Desktop/kivys/myapp/tutors/2/.buildozer/android/platform/python-for-android/pythonforandroid/build.py", line 603, in build_recipes
run_pymodules_install(
File "/Users/apple/Desktop/kivys/myapp/tutors/2/.buildozer/android/platform/python-for-android/pythonforandroid/build.py", line 769, in run_pymodules_install
shprint(host_python, '-m', 'venv', 'venv')
File "/Users/apple/Desktop/kivys/myapp/tutors/2/.buildozer/android/platform/python-for-android/pythonforandroid/logger.py", line 167, in shprint
for line in output:
File "/usr/local/lib/python3.9/site-packages/sh.py", line 953, in next
self.wait()
File "/usr/local/lib/python3.9/site-packages/sh.py", line 879, in wait
self.handle_command_exit_code(exit_code)
File "/usr/local/lib/python3.9/site-packages/sh.py", line 905, in handle_command_exit_code
raise exc
sh.ErrorReturnCode_1:
File "/usr/local/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/local/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 87, in _run_code exec(code, run_globals) File "/Users/apple/Desktop/kivys/myapp/tutors/2/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1276, in
RAN: /Users/apple/Desktop/kivys/myapp/tutors/2/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build/python3 -m venv venv
STDOUT: Error: Command '['/Users/apple/Desktop/kivys/myapp/tutors/2/.buildozer/android/platform/build-armeabi-v7a/build/venv/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.
STDERR:
Command failed: /usr/local/opt/python@3.9/bin/python3.9 -m pythonforandroid.toolchain create --dist_name=myapp --bootstrap=sdl2 --requirements=python3,kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir="/Users/apple/Desktop/kivys/myapp/tutors/2/.buildozer/android/platform/build-armeabi-v7a" --ndk-api=21
ENVIRONMENT:
GST_PLUGIN_SCANNER = '/Applications/Kivy.app/Contents/Resources/venv/../../Resources/gst-plugin-scanner'
TERM_PROGRAM = 'Apple_Terminal'
DYLD_FALLBACK_LIBRARY_PATH = '/Applications/Kivy.app/Contents/Resources/venv/../../lib:'
SHELL = '/bin/bash'
TERM = 'xterm-256color'
TMPDIR = '/var/folders/wl/mlt_prs96gb8d38tldn148f00000gp/T/'
TERM_PROGRAM_VERSION = '440'
OLDPWD = '/Users/apple/Desktop/kivys/myapp/tutors'
TERM_SESSION_ID = '665EE818-C99F-453B-9191-BC819F53DCD3'
USER = 'apple'
GST_PLUGIN_SYSTEM_PATH = '/Applications/Kivy.app/Contents/Resources/venv/../../Frameworks/GStreamer.framework/Versions/Current/lib/gstreamer-1.0'
SSH_AUTH_SOCK = '/private/tmp/com.apple.launchd.286dGAByCi/Listeners'
LD_PRELOAD_PATH = '/Applications/Kivy.app/Contents/Resources/venv/../../lib'
PATH = '/Users/apple/.buildozer/android/platform/apache-ant-1.9.4/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/apple/Library/Python/3.7/bin'
GST_REGISTRY = '/Applications/Kivy.app/Contents/Resources/venv/../../Resources/gst.registry'
__CFBundleIdentifier = 'com.apple.Terminal'
PWD = '/Users/apple/Desktop/kivys/myapp/tutors/2'
JAVA_HOME = '/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home'
LANG = 'zh_CN.UTF-8'
PYTHONHOME = ''
XPC_FLAGS = '0x0'
PS1 = '\h:\W \u\$ '
XPC_SERVICE_NAME = '0'
SHLVL = '1'
HOME = '/Users/apple'
GTK_PATH = '/Applications/Kivy.app/Contents/Resources/venv/../../Frameworks/GStreamer.framework/Versions/Current'
LOGNAME = 'apple'
GIO_EXTRA_MODULES = '/Applications/Kivy.app/Contents/Resources/venv/../../Frameworks/GStreamer.framework/Versions/Current/lib/gio/modules'
KIVY_HOME = '/Applications/Kivy.app/Contents/Resources/venv/../../Resources/.kivy'
_ = '/usr/local/bin/buildozer'
__CF_USER_TEXT_ENCODING = '0x1F6:0x19:0x34'
PACKAGES_PATH = '/Users/apple/.buildozer/android/packages'
ANDROIDSDK = '/Users/apple/.buildozer/android/platform/android-sdk'
ANDROIDNDK = '/Users/apple/.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