Execution failed for task ':app:processDebugManifest' in Gradle - android

Receiving following errors
in Android Studio 2.2
Cannot resolve symbol R in Android Studio 2.2
in gradle console
Execution failed for task ':app:processDebugManifest'.
Manifest merger failed with multiple errors, see logs
Any help would be appreciated.

clean your build, and retry? Sometimes I noticed when I switch branches a lot my R.java file is outdated and doesn't get rebuilt correctly or references out of date xml id's.

Just rebuild project and it will be okay, I also have faced alot of times this error

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.

compileReleaseJavaWithJavaC failed for react native modules when building a release build

Task :react-native-device-info:compileReleaseJavaWithJavac FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':react-native-device-info:compileReleaseJavaWithJavac'.
java.io.FileNotFoundException: /workspace/eos-native/node_modules/react-native-device-info/android/build/intermediates/annotation_processor_list/release/annotationProcessors.json (No such file or directory)
The error makes sense , and the file is not there, but I have no idea why its not there? It is created when I run a debug version of the app and debug versions of my libraries, react-native-device-info, react-orientation-locker etc.. I've cleaned, gradle synched, rebuilt etc. but when trying to assemble or install a release build I get this error within seconds. What is causing the Java
I had the same problem in an android project (without react) when I added a library module.
After searching for a solution for quite some time, I finally deleted the .gradle directory in the project root folder.
This solved the problem for me.
update android gradle plugin to 3.3
update gradle to 4.10.3
fixed the issue for me.

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.
I solved this problem by adding the below line to the gradle.properties file:
android.enableAapt2=false

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:

Execution failed for task ':app:mockableAndroidJar'

I am using local gradle of version 2.4 and IntelliJ IDEA 14.1.3
When I run project from IntelliJ it runs fine but when execute gradle clean build command from command line it gives the flowing exception and build fails.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:mockableAndroidJar'.
> java.util.zip.ZipException: invalid entry compressed size (expected 2051 but got 2050 bytes)
This looks like an old ques which is not yet answered yet.
I got into same problem, when my jar files could not be read by Android Studio and it gave me the above mentioned error.
Taking lead from the comment by -Mikhail Boyarsky I changed classpath in build.gradle file to 'com.android.tools.build:gradle:2.2.3'.
Synced project and it started working.
I solved it by changing com.android.tools.build:gradle:2.3.0 version to 2.2.3, then build it with another exception and then I changed the version back to 2.3.0.
Not sure how it works, looks like a gradle bug.

Categories

Resources