Android Studio - mergeDebugResources exception
I found a solution to the problem.
There is an issue reported about gradle build problems, it is not the same, but the solution seems to solve the mergeResourceDebug issues too. (issue here https://code.google.com/p/android/issues/detail?id=56158). In the comments it is stated that the solution is solved in Gradle 0.4.3.
To use Gradle 0.4.3, the build.gradle file needs to be updated manually. (Updating Android Studio does not change the build file)
Here is what I changed In build.gradle:
Since changing this, I have not seen any more mergeDebugResource issues when running my project. Hope this helps!
Edit: to stay up to date with Gradle you can change the version number to 0.4.+
Build android error at stage app:mergeDebugResources, ParseError AttributeNSNotUnique
The answer to this question is that the error and the stacktrace are actually two different problems.
There was a problem with one of my xml layouts, yes, but the biggest issue was that the version of gradle 4.2.1 has obfuscated how to find the problem.
So if you want to actually know what is failing, downgrade your gradle to 4.1.3 and gradle will now tell you where your xml is wrong. I recommend this whatever error you have, be it a parse error, a resource error or a prolog error.
Now, for the actual exception, Android Studio does not detect when an attribute is duplicated between the <layout> tag and another different layout, like constraintLayout, frameLayout, etc... so if you are using databinding, check that any extra layouts you are using don't have the same attribute. In fact I just recommend moving any attributes to your second, implementation specific layout and leave the databinding tag alone.
Gradle throw app:mergedebugresources exception
Sorry to update my answer.
Found out actually is 9 patch image with error format, one 9 patch image didn't proper draw the black corner line in the most outer.
My careless mistake! Really using photoshop not proper to make 9 patch image!
Previous ant project didn't notice this issue.
Now with Gradle that give proper check and throws exception.
However, the log message really not helpful for debug!
Take a Screenshot of a Whole View
Record/Save Audio from Voice Recognition Intent
Push Notifications When App Is Closed
How to Handle Listview Click in Android
How to Make Toolbar Transparent
Alarmmanager Fires Alarms at Wrong Time
Actionbar Notification Count Icon (Badge) Like Google Has
Firebase Fcm Notifications Click_Action Payload
How to Get Camera Result as a Uri in Data Folder
Open Link of Google Play Store in Mobile Version Android
Android Recyclerview VS Listview with Viewholder
How to Show Enable Location Dialog Like Google Maps
Couldn't Get Connection Factory Client