I've just installed android studio and there's an error I don't know how to fix
-
Hey mate. Did you ever resolve this issue? – Christofer Ohlsson May 04 '14 at 19:06
-
1Nope , Actually I'm using eclipse now – user3100088 May 07 '14 at 23:45
-
1possible duplicate of [Android Studio - mergeDebugResources exception](http://stackoverflow.com/questions/17121033/android-studio-mergedebugresources-exception) – Rohit Gupta Aug 01 '15 at 15:15
-
Only this worked for me so here : [http://stackoverflow.com/a/40928360/5134647](http://stackoverflow.com/a/40928360/5134647) – shadygoneinsane Dec 02 '16 at 09:24
-
Possible duplicate of [Error:Execution failed for task ':app:mergeDebugResources'. > Some file crunching failed, see logs for details build gradle issues](https://stackoverflow.com/questions/37131212/errorexecution-failed-for-task-appmergedebugresources-some-file-crunchin) – shadygoneinsane Sep 30 '17 at 10:15
-
Possible answer https://stackoverflow.com/a/69879413/9110576 – Haseeb Hassan Asif Nov 08 '21 at 06:49
15 Answers
Try clean project...
If it doesn't work... Then... Goto build.gradle in project section
Try downgrading the gradle version
From...
dependencies {
classpath 'com.android.tools.build:gradle:1.5.0'
}
To...
dependencies {
classpath 'com.android.tools.build:gradle:1.2.0'
}
Then gradle.properties, add this
org.gradle.jvmargs=-XX\:MaxHeapSize\=256m -Xmx256m
Sync it... Clean/Rebuild... It worked for me... So, I am sharing...

- 141
- 1
- 10
-
Same prob when updating to 2.1.0 from 1.3. Its working when changing gradle version to 1.3 but NOT to 2.1.0. How can we resolve with gradle version 2.1.0 ? Any solution? – Karthikeyan Ve Apr 30 '16 at 06:35
I can see libc error in the log.
install these packages in your system
sudo apt-get install lib32stdc++6 lib32z1 lib32z1-dev
Restart android studio after installation

- 8,846
- 8
- 50
- 85
I had that problem, but it was because my images changed them manually from .JPG to .PNG, so I just changed them with PNG paint and solved the problem

- 61
- 1
- 1
This issue can be resolved by trying multiple solutions like:
- Clean the project OR delete build folder and rebuild.
- Downgrading gradle version
- Check for the generated build file path, as it may be exceeding the windows max path length of 255 characters. Try using short names to make sure your project path is not too long.
- You may have a corrupted .9.png in your drawables directory

- 357
- 3
- 11
In My case, I've written below code in build.gradle
android {
// ...
aaptOptions.cruncherEnabled = false
aaptOptions.useNewCruncher = false
// ...
}
It's work for me!...

- 3,230
- 7
- 26
- 44
How to fix app:mergeDebugResources in Android Studio (Resource path could not resolved / R.id is not accessible)
- Go to the project folder from file explorer.
- Delete(before delete Backup all files) .idea folder
- If there are any .gradle folder do the 2nd step to the .gradle folder too.
- If the Exception is referring any 3rd party library/jar file delete that also(keep a backup to add later)
- Open the project again from Android studio as "Open an existing android studio project"
- On right side gradle tab click "Refresh all Gradle projects".This will create the gradel project dependancies
- Now add again 3rd party libraries to the same previous folder structure
This should resolve your Gradle issue.. good luck.

- 31
- 7
Click Gradle in the right side tab
Click the toggle offline icon (enable the Gradle online)
Now try building the project
And that's it!

- 1
- 1

- 29
- 2
Okay here is a simple fix.
This error popped in front of me when I tried to manually change .jpg file to .png and then was copying & pasting it in my 'drawable' folder.
I rebuild and cleaned Project many times but nothing happened, then I removed that .png image and replaced that file with a different pre-existing .png image (or you can change it by help of paint and then paste it in drawable folder)
Now rebuild and clean the project . It works.
Hope it helps..!

- 1,029
- 10
- 11
If you have recently used ionic cordova resources or ionic resources command please check the files generated in folders of platform/build/res there might be some files corrupted , so just delete those files and build the apk.. hope it helps someone worked for me

- 437
- 6
- 18
For me upgrading gradle version and plugin to the latest version did the trick.

- 3,666
- 9
- 25
- 39
By default, Android Studio has a maximum heap size of 1280MB. If you are working on a large project, or your system has a lot of RAM, you can improve performance by increasing the maximum heap size for Android Studio processes, such as the core IDE, Gradle daemon, and Kotlin daemon.
If you use a 64-bit system that has at least 5 GB of RAM, you can also adjust the heap sizes for your project manually. To do so, follow these steps:
Click File > Settings from the menu bar (or Android Studio > Preferences on macOS). Click Appearance & Behavior > System Settings > Memory Settings.
For more Info click

- 1,126
- 13
- 18
For me. I changed the color of .xml image (vector image) like this.
ic_action_add.xml
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="#FFFFFF"
android:alpha="0.8">
<path
android:fillColor="@android:color/white"
android:pathData="M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/>
</vector>
to:
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="#FFFFFF"
android:alpha="0.8">
<path
android:fillColor="#FF000000"
android:pathData="M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/>
</vector>
i just changed android:fillColor="@android:color/white"
to android:fillColor="#FF000000"
and it's worked for me :)

- 197
- 3
- 13
Android Studio + Kotlin + MacOS
This happining generally with "google-services.json" file. This is my example:
Solved. I deleted red line in strings.xml file because system already created same name variable which is "google_api_key" in values.xml file.

- 6,204
- 45
- 38
At build.gradle (app) not (root) inside dependencies {[here]} add this line :
**implementation 'com.android.tools.build:gradle:7.2.2'**
This worked for me ^_^ Hope it will help , , , Good lock coding

- 1
- 1
I have the smae problem when adding geolocator add jcenter() to build.gradle solve the problem
repositories {
google()
mavenCentral()
jcenter() //here
}

- 21
- 4