#python #android #kivy #buildozer
#python #Android #kivy #buildozer
Вопрос:
У меня есть проект kivy, и я смог создать apk с помощью buildozer в конце августа. Теперь, когда я попытался собрать его снова, я обнаружил проблему со сборкой. Вот результат сборки:
Detected highest available build tools version to be 30.0.2
[DEBUG]: -> running gradlew assembleDebug
[DEBUG]: > Task :packageDebug FAILED
[DEBUG]:
[DEBUG]: FAILURE: Build failed with an exception.
[DEBUG]:
[DEBUG]: * What went wrong:
[DEBUG]: Execution failed for task ':packageDebug'.
[DEBUG]: > Java heap space
[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 2s
[DEBUG]: 27 actionable tasks: 4 executed, 23 up-to-date
[DEBUG]:
[DEBUG]:
Exception in thread background thread for pid 119231:
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 "/usr/local/lib/python3.8/dist-packages/sh-1.13.1-py3.8.egg/sh.py", line 1662, in wrap
fn(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/sh-1.13.1-py3.8.egg/sh.py", line 2606, in background_thread
handle_exit_code(exit_code)
File "/usr/local/lib/python3.8/dist-packages/sh-1.13.1-py3.8.egg/sh.py", line 2304, in fn
return self.command.handle_command_exit_code(exit_code)
File "/usr/local/lib/python3.8/dist-packages/sh-1.13.1-py3.8.egg/sh.py", line 877, in handle_command_exit_code
raise exc
sh.ErrorReturnCode_1:
RAN: /home/evgeny/spdu/kivy/game/crystal-game/.buildozer/android/platform/build-arm64-v8a/dists/myapp__arm64-v8a/gradlew assembleDebug
STDOUT:
> Task :packageDebug FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':packageDebug'.
> Java heap space
* 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 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.4.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 2s
27 actionable tasks: 4 executed, 23 up-to-date
[INFO]: STDOUT (last 20 lines of 24):
[DEBUG]:FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':packageDebug'.
> Java heap space
* 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 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.4.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 2s
27 actionable tasks: 4 executed, 23 up-to-date
[INFO]: STDERR:
[INFO]: COMMAND:
cd /home/evgeny/spdu/kivy/game/crystal-game/.buildozer/android/platform/build-arm64-v8a/dists/myapp__arm64-v8a amp;amp; /home/evgeny/spdu/kivy/game/crystal-game/.buildozer/android/platform/build-arm64-v8a/dists/myapp__arm64-v8a/gradlew assembleDebug
[WARNING]: ERROR: /home/evgeny/spdu/kivy/game/crystal-game/.buildozer/android/platform/build-arm64-v8a/dists/myapp__arm64-v8a/gradlew failed!
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.
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
Я ничего не менял в сборке, сейчас она просто не работает, поэтому я не знаю, как это исправить. Пытался найти что-нибудь в Интернете, но не нашел никаких решений, надеюсь получить несколько советов здесь.
Ответ №1:
Проблема заключалась в размере ресурсов, которые я использовал в своей сборке. У меня было несколько файлов wav весом около 60 МБ. После уменьшения их размера проблема исчезла.