赞
踩
AndroidStudio4.12 & AndroidStudio2022.3+
Unity2018.4.36
Execution failed for task ':processDebugResources'.
java.lang.ArrayIndexOutOfBoundsException: 1866
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> AAPT2 aapt2-4.1.0-6503028-windows Daemon #0: Unexpected error during link, attempting to stop daemon.
This should not happen under normal circumstances, please file an issue if it does.
Execution failed for task ':processDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> AAPT2 aapt2-4.1.0-6503028-windows Daemon #0: Unexpected error during link, attempting to stop daemon.
This should not happen under normal circumstances, please file an issue if it does.
AAPT2 process unexpectedly exit. Error output:
aapt2.exe W 04-07 17:07:32 2044 13796 LoadedArsc.cpp:657] Unknown chunk type '200'.
解决方法(1):讲将build.gradle中此处多余的文件删除
解决方法(2):
2.1
Build Setting–>Publishing Setting–>Build --Custom Gradle Template勾选上,
这时候会自动生成Plugins/Android下mainTemplate,打开这个文件
2.2
修改mainTemplate: 去掉 '**STREAMING_ASSETS** 或者 特地某个类型不压缩如.bundle后缀的文件 如果不填 默认压缩
原因:
(1)aaptOptions.noCompress数组的最大容量为255,也即可以不经压缩打到apk包里的资源文件数不能超过255个。也可以将多余的 STREAMING_ASSETS (含义为StreamingAssets文件夹下所有资源都不压缩)去掉,改为只针对某些类型的资源不压缩,比如.bundle
————————————————
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/js0907/article/details/105641070
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。