【发布时间】:2019-06-03 02:49:25
【问题描述】:
我正在尝试使用 gradle 的 assembleDebug 命令构建一个 APK,但我目前遇到了这个错误:
`java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource compilation failed`
输出如下:
* What went wrong: Execution failed for task ':app:mergeDebugResources'.
> java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource compilation failed Output: C:\Windows\System32\config\systemprofile\.gradle\caches\transforms-1\files-1.1\core-0.9.6.0.aar\18f1091c245c93f2961ec83a1230d434\res\anim\popup_exit.xml: error: file not found.
Command: C:\Windows\System32\config\systemprofile\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\e73f7e9c03a39a7518e973bff44c7fef\aapt2-3.2.1-4818971-windows\aapt2.exe compile --legacy \
-o \
C:\Program Files (x86)\Jenkins\workspace\HIRI App Android\app\build\intermediates\res\merged\debug \
C:\Windows\System32\config\systemprofile\.gradle\caches\transforms-1\files-1.1\core-0.9.6.0.aar\18f1091c245c93f2961ec83a1230d434\res\anim\popup_exit.xml Daemon: AAPT2 aapt2-3.2.1-4818971-windows Daemon #0
我的 build.gradle 文件如下:
buildscript { ext.kotlin_version = '1.2.71' repositories { google() jcenter() } dependencies { classpath 'com.android.tools.build:gradle:3.2.1' classpath 'com.google.gms:google-services:4.2.0' classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0' classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { google() jcenter() maven { url 'https://maven.google.com' } maven { url 'https://jitpack.io' } }
我使用的 gradle 版本是 4.9
我在另外两个项目中也面临同样的问题。
【问题讨论】:
标签: java android jenkins gradle kotlin