问题
I'm having an error when, I tried to create an .apk file using buildozer. I have put tensorflow, keras, numpy in requirements (.spec file). However when I try to compile I receive this error:
[DEBUG]: Unable to strip library '1' due to error
/home/.../.buildozer/android/platform/android-
ndk-r19c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-
linux-androideabi-strip
returned from '/home/.../Desktop/Sign/.buildozer/android/platform/build-
armeabi- v7a/dists/signapp__armeabi-
v7a/build/intermediates/transforms/mergeJniLibs/debug/0/lib/armeabi-
v7a/gdb.setup', packaging it as is.
[DEBUG]:
[DEBUG]: > Task :packageDebug FAILED
[DEBUG]:
[DEBUG]: FAILURE: Build failed with an exception.
[DEBUG]:
[DEBUG]: * What went wrong:
[DEBUG]: Execution failed for task ':packageDebug'.
[DEBUG]: > org.gradle.tooling.BuildException (no error message)
[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]: Deprecated Gradle features were used in this build, making it incompatible with Gradle
7.0.
[DEBUG]: Use '--warning-mode all' to show the individual deprecation warnings.
[DEBUG]: See
https://docs.gradle.org/6.4.1/userguide/command_line_interface.html#sec:command_line_warnings
[DEBUG]:
[DEBUG]: BUILD FAILED in 9m 43s
[DEBUG]: 27 actionable tasks: 27 executed
[DEBUG]: > IDLE
[DEBUG]:
[DEBUG]:
Exception in thread background thread for pid 8828:
Traceback (most recent call last):
File "/usr/lib/python3.7/threading.py", line 926, in _bootstrap_inner
self.run()
File "/usr/lib/python3.7/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/home/.../venv/lib/python3.7/site-packages/sh.py", line 1662, in wrap
fn(*args, **kwargs)
File "/home/.../venv/lib/python3.7/site-packages/sh.py", line 2606, in background_thread
handle_exit_code(exit_code)
File "/home/.../venv/lib/python3.7/site-packages/sh.py", line 2304, in fn
return self.command.handle_command_exit_code(exit_code)
File "/home/.../venv/lib/python3.7/site-packages/sh.py", line 877, in handle_command_exit_code
raise exc
sh.ErrorReturnCode_1:
RAN: /home/..../Desktop/Sign/.buildozer/android/platform/build-armeabi-v7a/dists/signapp__armeabi-
v7a/gradlew assembleDebug
STDOUT:
Downloading https://services.gradle.org/distributions/gradle-6.4.1-all.zip
Unzipping /home/.../.gradle/wrapper/dists/gradle-6.4.1-all/ihamk9lkfdnk0vct06i4nheil/gradle-6.4.1- all.zip to /home/.../.gradle/wrapper/dists/gradle-6.4.1-all/ihamk9lkfdnk0vct06i4nheil Set executable permissions for: /home/..../.gradle/wrapper/dists/gradle-6.4.1- all/ihamk9lkfdnk0vct06i4nheil/gradle-6.4.1/bin/gradle
Welcome to Gradle 6.4.1!
Task :transformNativeLibsWithStripDebugSymbolForDebug
/home/.../.buildozer/android/platform/android-ndk-r19c/toolchains/arm-linux-androideabi-
4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-
strip:/home/..../Desktop/Sign/.buildozer/android/platform/build-armeabi-v7a/dists/signapp__armeabi-
v7a/build/intermediates/transforms/mergeJniLibs/debug/0/lib/armeabi-v7a/gdb.setup: File format not
recognized
Unable to strip library '1' due to error /home/.../.buildozer/android/platform/android-ndk-
r19c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-strip
returned from '/home/..../Desktop/Sign/.buildozer/android/platform/build-armeabi-
v7a/dists/signapp__armeabi-v7a/build/intermediates/transforms/mergeJniLibs/debug/0/lib/armeabi-
v7a/gdb.setup', packaging it as is.
STDERR:
WARNING: Received a --sdk argument, but this argument is deprecated and does nothing.
No setup.py/pyproject.toml used, copying full private data into .apk.
[INFO]: STDOUT (last 20 lines of 63):
Execution failed for task ':packageDebug'.
> org.gradle.tooling.BuildException (no error message)
[INFO]: STDERR:
[INFO]: COMMAND:
cd /home/.../Desktop/Sign/.buildozer/android/platform/build-armeabi-v7a/dists/signapp__armeabi-v7a
&& /home/.../Desktop/Sign/.buildozer/android/platform/build-armeabi-v7a/dists/signapp__armeabi-
v7a/gradlew assembleDebug
[WARNING]: ERROR: /home/.../Desktop/Sign/.buildozer/android/platform/build-armeabi-
v7a/dists/signapp__armeabi-v7a/gradlew failed!
# Command failed: /home/.../venv/bin/python3 -m pythonforandroid.toolchain apk --debug --
bootstrap=sdl2 --dist_name signapp --name Sign --version 0.01 --package org.test.signapp --minsdk 21
--ndk-api 21 --private /home/.../Desktop/Sign/.buildozer/android/app --android-entrypoint
org.kivy.android.PythonActivity --android-apptheme @android:style/Theme.NoTitleBar --orientation
sensor --window --copy-libs --arch armeabi-v7a --color=always --storage-
dir="/home/.../Desktop/Sign/.buildozer/android/platform/build-armeabi-v7a" --ndk-api=21
# ENVIRONMENT:
# GJS_DEBUG_TOPICS = 'JS ERROR;JS LOG'
# WINDOWPATH = '2'
# IM_CONFIG_PHASE = '1'
# LC_PAPER = 'bn_BD'
# LANG = 'en_US.UTF-8'
# XDG_CURRENT_DESKTOP = 'ubuntu:GNOME'
# GNOME_TERMINAL_SCREEN = '/org/gnome/Terminal/screen/b499b12e_db40_4aa0_9893_1cc0cf70a6e9'
# CLUTTER_IM_MODULE = 'ibus'
# GJS_DEBUG_OUTPUT = 'stderr'
# LESSCLOSE = '/usr/bin/lesspipe %s %s'
# XDG_SESSION_CLASS = 'user'
# TERM = 'xterm-256color'
# LC_IDENTIFICATION = 'bn_BD'
# LESSOPEN = '| /usr/bin/lesspipe %s'
# GNOME_TERMINAL_SERVICE = ':1.92'
# DISPLAY = ':0'
# SHLVL = '1'
# LC_TELEPHONE = 'bn_BD'
# QT_IM_MODULE = 'ibus'
# LC_MEASUREMENT = 'bn_BD'
# XDG_RUNTIME_DIR = '/run/user/1000'
# ANDROIDSDK = '/home/.../.buildozer/android/platform/android-sdk'
# ANDROIDNDK = '/home/.../.buildozer/android/platform/android-ndk-r19c'
# ANDROIDAPI = '28'
# ANDROIDMINAPI = '21'
I'm using
- Ubuntu 19.10
- Python 3.7.5
- Kivy 1.11.1
- Buildozer 1.2.0
来源:https://stackoverflow.com/questions/62539712/execution-failed-for-task-packagedebug-in-buildozer