Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':mergeDevOnlySlDebugResources' only on Jenkins

When I use Android Studio 3.0 Beta 7 and update my project with the Android Gradle 3.0.0-beta7 plugin my project builds fine in both the debug and rc (proguard enabled) variants.

When I attempt to build on my Jenkins box, I get a bunch of:

C:\Windows\System32\config\systemprofile\.gradle\caches\transforms-1\files-1.1\androidsdk-2.4.12-fullRelease.aar\222313e24d6c4b00972b4191a95e6e2e\res\drawable-xxhdpi-v4\ic_teads_sdk_contact_us.png: error: file not found.

C:\Windows\System32\config\systemprofile\.gradle\caches\transforms-1\files-1.1\appcompat-v7-25.3.1.aar\c8fedf0a28e83c9ac57e1ac18693c6a0\res\drawable-hdpi-v4\abc_tab_indicator_mtrl_alpha.9.png: error: file not found.

C:\Windows\System32\config\systemprofile\.gradle\caches\transforms-1\files-1.1\android-sdk-ui-2.0.4.aar\0b51ce1d665e491601444168a26000ca\res\drawable-xhdpi-v4\com_appboy_inappmessage_chevron.png: error: file not found.

What went wrong:

Execution failed for task ':mergeDevOnlySlDebugResources'.

Error: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details

I tried to use AAPT instead of AAPT2 and that still gives me the same problem. My other jenkins projects that are not running this gradle 3 change still run fine. Also the files that can't be found from above are indeed on my machine in the location that AAPT can't find.

Has anyone run into this before?

I've seen error's online about invalid PNG or actual errors from using the new AAPT2, but this is different.

like image 889
L7ColWinters Avatar asked Oct 10 '17 18:10

L7ColWinters


1 Answers

I solved this problem by adding the below line to the gradle.properties file:

android.enableAapt2=false
like image 142
A Mo Avatar answered Oct 19 '22 18:10

A Mo