更新了as3.2.1后,编译不通过,报错com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource compilation failed
然后提示的是资源文件有问题,新版本好像不支持资源文件里的id值
org.gradle.internal.UncheckedException: java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource compilation failed
Output: D:\Project\Media\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:2166: error: <item> inner element must either be a resource reference or empty.
Command: C:\Users\Administrator\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\425072725c72ff966e860c03f13ead3b\aapt2-3.2.1-4818971-windows\aapt2.exe compile --legacy \
-o \
D:\Project\Media\app\build\intermediates\res\merged\debug \
D:\Project\Media\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml
提示是下面的资源文件出问题了
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools">
<item name="version_update_version_dialog_commit" type="id" >0x66</item>
</resources>
将上面代码改成
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools">
<item name="version_update_version_dialog_commit" type="id" />
</resources>
重新构建就可以了,项目太赶了暂时没时间细研究,先记录下