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

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.

I solved this problem by adding the below line to the gradle.properties file:
android.enableAapt2=false

Related

Building android build with jenkins

I am trying to build android with Jenkin. But I am getting this compilation error:
Execution failed for task ':app:mergeDebugResources'.
> Multiple task action failures occurred:
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource compilation failed
AAPT: C:\Windows\System32\config\systemprofile\AppData\Local\Jenkins\.jenkins\workspace\android_build\app\build\intermediates\res\merged\debug: error: The system cannot find the file specified. (2).
Can anyone else facing this issue. I tried running the build on Android Studio and it works fine. I have defined the sdk path in jenkins and setup gradle also.
Please help.
So I found a solution that worked for me. I was using jenkins:2.277.4, I downgraded the jenkin version to 2.204.6 and suddenly it worked. Also I used war file this time so the path to workspace was smaller as compared to previous install and yeah also use app:build as task for build so you dont get lint error for other libraries.

Unsupported type 'delimiter'

I updated my android studio to latest version (3.0) few days ago .
I worked with my old android projects without any problem.
But today for the first time after updated to new version I created a new project(new Java project).when I try to run it, it shows this error.
Error:Error: Unsupported type 'delimiter'
I cleaned and rebuild the project but it didn't work.
I can see this on the Gradle console
*What went wrong:
Execution failed for task ':app:mergeDebugResources'.
C:\Users\Asoft.gradle\caches\transforms-1\files-1.1\appcompat-v7-26.1.0.aar\51aeb15d71de80d9c27043b97bce9776\res\values\values.xml: Error: Unsupported type 'delimiter'
This is what I can see in the messages
Error:Execution failed for task ':app:mergeDebugResources'.
C:\Users\Asoft.gradle\caches\transforms-1\files-1.1\appcompat-v7-26.1.0.aar\51aeb15d71de80d9c27043b97bce9776\res\values\values.xml: Error: Unsupported type 'delimiter'
Error:Error: Unsupported type 'delimiter'
Finally I found a possible solution
I followed the path given on the error message
C:\Users\Asoft.gradle\caches\transforms-1\files-1.1\appcompat-v7-26.1.0.aar\51aeb15d71de80d9c27043b97bce9776\res\values\values.xml
and deleted the file.
After a clean and build the app started running without any error.

Gradle error: Execution failed for task ':crashlyticsGenerateSymbolsArmRelease'. > Crashlytics Developer Tools error

I had setup crashlytics to get ndk crashes for my Android app. Crashes are getting recorded in crashlytics but I am not getting the line numbers.
Went through: https://support.crashlytics.com/knowledgebase/articles/605190-missing-line-numbers-in-native-crashes
I am getting the following error on running below command:
./gradlew crashlyticsUploadSymbolsArmRelease
What went wrong:
Execution failed for task ':crashlyticsGenerateSymbolsArmRelease'.
Crashlytics Developer Tools error.
I have tried various solutions but nothing is helping.
In case you are still looking: I had the same problem and found the correct command in the Gradle view:
app->Tasks->other->crashlyticsUploadSymbolsMYAPPVARIANTNAME
You can search the gradle tasks in the gradle window as well by just starting to type:

Gradle Android task crashing with unclear error

I am trying to run a Gradle Android task generated by libGDX utility (the desktop task runs fine) in IntelliJ IDEA, but I'm only getting this nonspecific error message. What is the issue, or where are the logs, or how to enabled logs?
Information:Gradle: Executing tasks: [:core:assemble, :android:assembleDebug]
Information:24. 10. 2015 16:58 - Compilation completed with 1 error and 0 warnings in 9s 415ms
Error:Gradle: Execution failed for task ':android:proguardDebug'.
> java.io.IOException: Please correct the above warnings first.
PS: Not sure if it is relevant, but I have modified build files and ProGuard file to support Scala as described there.
I did not find a way of getting any useful logs from IntelliJ IDEA. I solved the problem by running Gradle from console.
gradlew assemble --stacktrace --info
Problem was Gradle could not find tools.jar. Adding system environment variable JAVA_HOME pointing to Java SDK directory fixed the issue.

Lint error fixing

I am getting lint error in android studio as
Error:Execution failed for task ':app:lint'. Lint found errors in the
project; aborting build. Fix the issues identified by lint, or add the
following to your build script to proceed with errors:
android {
lintOptions {
abortOnError false
} }
Information:BUILD FAILED Information:Total time: 7.288 secs Information:1 >error Information:0 warnings
Build is getting failed
But it is not showing where exactly the error and even IDE(Android studio) is also not displaying any error mark in files.
How to redirect lint error to source file.?
I don't want to skip the lint check.
Please help me.
From the command line, run gradlew lintDebug (or gradlew lint[variantName] for a different variant).
This will generate a full lint report at /app/build/outputs. I recommend the HTML version (lint-results-debug.html). In there you will find all Android lint issues and their severity.
Alternatively, you can go to Analyze > Inspect Code in Android Studio to run lint. Switch the view to group them by severity- the errors are the ones blocking your build.
The erros reports with the lines and exactly erros font are found in: Your app release builds folder, then:appname/app/build/reports.
there you will find the lint-results-release-fatal. Open it in any browser to find the problems.
Hope it helps.

Categories

Resources