Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Duplicate value fo resource 'attr/tint'

I do not know how this error started to happen, I simply closed the android studio yesterday and I turned off the pc, today, I turned on the pc and opened the android studio, then this error appeared soon after opening the android studio.

What have I tried?

invalidate cache

rename and delete files that look like duplicates.

delete .gradle and clear / rebuild project

C:\Users\joaoa.gradle\caches\transforms-1\files-1.1\appcompat-v7-27.0.1.aar\70b6446a0ad42e67664086d0c5dca4d5\res\values\values.xml

C:\Users\joaoa\Desktop\MyPast\myProjects\project001\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml

Error:java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details

Error:Execution failed for task ':app:mergeDebugResources'. Error: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details

like image 536
userUndefinied Avatar asked Dec 07 '17 01:12

userUndefinied


2 Answers

I don't think this is a gradle version issue... I am using Android Studio 3.0 with Gradle Plugin Version 3.0.1 (which uses Gradle 4.1) THE LATEST. And I am getting this same issue. Just rename whatever attribute you've named tint to something like libTint or lib_tint or even more obscure ili_lib_tint so the issue can be resolved. I really want to use this lib and not look else where, please.

This is the xml element causing the issue

ImageLetterIcon/imageletter/src/main/res/values/attrs.xml

 <declare-styleable name="TintableImageView">
like image 114
Sujay Avatar answered Oct 19 '22 17:10

Sujay


Please open show log in files and delete all the files where you located and please restart your android studio.

if not solved then Again restart with option like InvalidDate Cache and Restart.

Hope this helps you.

like image 21
Jyubin Patel Avatar answered Oct 19 '22 17:10

Jyubin Patel