使用带有--release标签的ionic build时,任务':app:mergeReleaseResources'的执行失败 [英] Execution failed for task ':app:mergeReleaseResources' when using ionic build with--release tag

查看:48
本文介绍了使用带有--release标签的ionic build时,任务':app:mergeReleaseResources'的执行失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用ionic run命令生成apk。
一旦放入-release 标记,就会引发两个错误。似乎与资源有关。

I'm using the ionic run command to generate an apk. As soon as I put the --release tag, it throws two errors. It seems it's related to the resources.

科尔多瓦命令

ionic cordova build android --release --prod --verbose

错误

Execution failed for task ':app:mergeReleaseResources'.
> java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.3.0-5013011-windows
Daemon #0: Unexpected error during compile '..\platforms\android\app\src\main\res\drawable-port-xxxhdpi\screen.png', attempting to stop daemon.
This should not happen under normal circumstances, please file an issue if it does.

Exception in thread "ForkJoinPool.commonPool-worker-0" java.lang.IllegalStateException: AAPT Process manager cannot be shut down while daemons are in use

我尝试了以下操作:

ionic cordova platform rm android
ionic cordova platform add android
ionic cordova resources -f

其他信息:

我的Gradle版本是5.4.1,已将其添加到PATH,并且Android Studio配置为使用此特定版本。

My Gradle version is 5.4.1, it's added to PATH and Android Studio is configured to use this specific version.

可能是什么问题?

推荐答案

经过一些调试后,看起来好像是来自splash.png文件。

After some debugging, it looks like it comes from the splash.png file.

如果文件太大,则看起来无法使用。 (是否知道最大文件大小限制?)

If the file is too big, it looks it won't work. (Anyone knows the maximum file size limit ?)

解决方案:使用较小的splash.png图片。

Solution: use a smaller splash.png image.

这篇关于使用带有--release标签的ionic build时,任务':app:mergeReleaseResources'的执行失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆