Невозможно скомпилировать выпуск APK с помощью Buildozer

Я пытаюсь создать apk с помощью команды buildozer -v android release, но это не удается. buildozer -v android debug работает нормально и смог упаковать apk.

Вот ошибка

[DEBUG]:    
[DEBUG]:    > Task :mergeReleaseResources FAILED
[DEBUG]:    Error: java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: AAPT2 error: check logs for details
[DEBUG]:    
[DEBUG]:    
[DEBUG]:    FAILURE: Build failed with an exception.
[DEBUG]:    
[DEBUG]:    * What went wrong:
[DEBUG]:    Execution failed for task ':mergeReleaseResources'.
[DEBUG]:    > Error: java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: AAPT2 error: check logs for details
[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]:    BUILD FAILED in 30s
[DEBUG]:    9 actionable tasks: 8 executed, 1 up-to-date
> Task :mergeReleaseResources FAILED
Error: java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: AAPT2 error: check logs for details


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':mergeReleaseResources'.
> Error: java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: AAPT2 error: check logs for details

* 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 30s
9 actionable tasks: 8 executed, 1 up-to-date


  STDERR:


[INFO]:    STDOUT (last 20 lines of 28):
    > Task :mergeReleaseResources FAILED    
Error: java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: AAPT2 error: check logs for details    


FAILURE: Build failed with an exception.    

* What went wrong:  
Execution failed for task ':mergeReleaseResources'. 
> Error: java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: AAPT2 error: check logs for details  

* 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 30s 
9 actionable tasks: 8 executed, 1 up-to-date    

[INFO]:    STDERR:

[INFO]:    COMMAND:
cd /media/itutorgurgaon/1CE47CDAE47CB79A/Users/HP/AppData/Local/Programs/Python/Python37/KivyApps-ChitkaranSingh/class12english/.buildozer/android/platform/build/dists/Class12English && /media/itutorgurgaon/1CE47CDAE47CB79A/Users/HP/AppData/Local/Programs/Python/Python37/KivyApps-ChitkaranSingh/class12english/.buildozer/android/platform/build/dists/Class12English/gradlew assembleRelease

[WARNING]: ERROR: /media/itutorgurgaon/1CE47CDAE47CB79A/Users/HP/AppData/Local/Programs/Python/Python37/KivyApps-ChitkaranSingh/class12english/.buildozer/android/platform/build/dists/Class12English/gradlew failed!
WARNING: Received a --sdk argument, but this argument is deprecated and does nothing.
No compiled python is present to zip, skipping.
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
# Command failed: /usr/bin/python -m pythonforandroid.toolchain apk --debug --bootstrap=sdl2 --dist_name Class12English --name 'English XII' --version 0.1 --package www.itutorgurgaon.com.class12english --android_api 27 --minsdk 21 --ndk-api 21 --private /media/itutorgurgaon/1CE47CDAE47CB79A/Users/HP/AppData/Local/Programs/Python/Python37/KivyApps-ChitkaranSingh/class12english/.buildozer/android/app --presplash /media/itutorgurgaon/1CE47CDAE47CB79A/Users/HP/AppData/Local/Programs/Python/Python37/KivyApps-ChitkaranSingh/class12english/icons/app_logo.jpg --icon /media/itutorgurgaon/1CE47CDAE47CB79A/Users/HP/AppData/Local/Programs/Python/Python37/KivyApps-ChitkaranSingh/class12english/icons/app_logo.jpg --orientation sensor --release --copy-libs --arch armeabi-v7a --color=always --storage-dir="/media/itutorgurgaon/1CE47CDAE47CB79A/Users/HP/AppData/Local/Programs/Python/Python37/KivyApps-ChitkaranSingh/class12english/.buildozer/android/platform/build" --ndk-api=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

Пожалуйста помоги !


person Chitkaran Singh    schedule 01.08.2019    source источник
comment
buildozer -v android debug работает?   -  person inclement    schedule 01.08.2019
comment
Да, это работало нормально   -  person Chitkaran Singh    schedule 02.08.2019


Ответы (1)


Я повозился с файлами code и spec. Ошибка, похоже, была jpg file, которую я использовал для presplash и icon в файле spec.

Я changed the jpg file to a png file. Пустота! АПК готов.

person Chitkaran Singh    schedule 02.08.2019