Android Studio: “Execution failed for task ':app:mergeDebugResources'” if project is created on drive C:
This is caused by the path length restriction.
I think it's 256 characters maximum.
Relocate your project and the build will succeed.
Android - Error:Execution failed for task ':app:mergeDebugResources'
Try code on your module build.gradle
:
android {
// ...
aaptOptions.cruncherEnabled = false
aaptOptions.useNewCruncher = false
// ...
}
It means Android studio DO NOT check PNG strictly.
Execution failed for task ':app:mergeDebugResources' , Unable to locate resourceFile in source-sets
I found by several testing that proguard rule is the issue for this error. Changing the proguard rules for debug solves the issue. Just need to set shrinkResources false
in the debug buildTypes.
buildTypes {
debug {
minifyEnabled true
shrinkResources false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
Related Topics
Update SQL Database with Contentvalues and the Update-Method
Cordova Cannot Add Android Failed with Exit Code Enoent
How to Save Image Taken from Camera and Show It to Listview - Crashes with "Illegalstateexception"
Clicking on Notification Is Not Starting Intended Activity
Stackoverflow: Caused by Nested Views
How to Highlight the Table Row on Click
How to Develop Android App Completely Using Python
Opening a File from Assets Folder in Android
Get Color Value Programmatically When It's a Reference (Theme)
How to Listen for a Custom Uri
How to Convert Date Format in Android
Eclipse Hangs at The Android Sdk Content Loader
Splash Screen While Loading a Url in a Webview in Android App
How Many Activities Vs Fragments
Startactivityforresult from Activitygroup
Android Studio Two Flavors with Different Manifest Files
How to Show a Preview of a Recyclerview's Contents in The Android Studio Editor