【问题标题】:Unable to Compile APK Release using Buildozer无法使用 Buildozer 编译 APK 版本
【发布时间】:2019-08-02 12:31:20
【问题描述】:

我正在尝试使用buildozer -v android release 命令构建apk,但它失败了。 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

请帮忙!

【问题讨论】:

  • buildozer -v android debug 工作吗?
  • 是的,效果很好

标签: kivy buildozer


【解决方案1】:

我对@9​​87654321@ 和spec 文件进行了一次摆弄。错误似乎是我在spec 文件中用于presplashiconjpg file

changed the jpg file to a png file。废了! APK 已准备就绪。

【讨论】:

    猜你喜欢
    • 2019-08-06
    • 2014-08-14
    • 2021-04-13
    • 2014-11-26
    • 1970-01-01
    • 2020-12-22
    • 2020-08-31
    • 2020-08-13
    相关资源
    最近更新 更多