Buildozer вылетает только с командой release

Я создал APK-файл с помощью buildozer, и все работает. Потом сделал релиз и залил в плей маркет. Я забыл значок приложения, и когда я добавляю значок в файл .spec, выпуск не происходит. Он четко работает в режиме отладки на моем телефоне, значок также четкий, и в logcat нет ошибки. Когда он выходит со значком, он вылетает. Любая помощь будет оценена по достоинству.

> Task :mergeReleaseResources FAILED
[DEBUG]:    Error: java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: AAPT2 error: check logs for details
[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]:    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]:    BUİLD FAILED in 27s
[DEBUG]:    9 actionable tasks: 1 executed, 8 up-to-date
[DEBUG]:    
[DEBUG]:    
Exception in thread background thread for pid 2238:
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/hakki/siirkarma/.buildozer/android/platform/build-arm64-v8a/dists/siirkarma__arm64-v8a/gradlew assembleRelease

  STDOUT:
Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use --status for details
/home/hakki/siirkarma/.buildozer/android/platform/build-arm64-v8a/dists/siirkarma__arm64-v8a/src/main/res/drawable/icon.png: error: failed to read PNG signature: file does not start with PNG signature.
/home/hakki/siirkarma/.buildozer/android/platform/build-arm64-v8a/dists/siirkarma__arm64-v8a/src/main/res/drawable/icon.png: error: file failed to compile.

> 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

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

BUİLD FAILED in 27s
9 actionable tasks: 1 executed, 8 up-to-date





[INFO]:    STDOUT (last 20 lines of 34):
[DEBUG]: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  
    
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   
    
BUİLD FAILED in 27s 
9 actionable tasks: 1 executed, 8 up-to-date    

[INFO]:    STDERR:
    
[INFO]:    COMMAND:
cd /home/hakki/siirkarma/.buildozer/android/platform/build-arm64-v8a/dists/siirkarma__arm64-v8a && /home/hakki/siirkarma/.buildozer/android/platform/build-arm64-v8a/dists/siirkarma__arm64-v8a/gradlew assembleRelease

[WARNING]: ERROR: /home/hakki/siirkarma/.buildozer/android/platform

Ошибка /build-arm64-v8a/dists/siirkarma__arm64-v8a/gradlew!


person İbrahim Hakkı    schedule 09.08.2020    source источник
comment
Опубликуйте ошибку.   -  person inclement    schedule 09.08.2020


Ответы (1)


Речь шла о png-файле. Я переименовал свой .jpeg в .png. Его нужно переформатировать, а не просто переименовать. Откройте JPEG в Paint и сохраните как png.

person İbrahim Hakkı    schedule 11.08.2020