I am getting these errors:
Error:resource drawable/abc_ic_ab_back_mtrl_am_alpha (aka com.instacoin:drawable/abc_ic_ab_back_mtrl_am_alpha) not found.
I just ran into this problem unable to find any solution whatsoever.
Finally I started checking all the layouts and drawables I had recently made and the error lied in one of them. I had written the import statement twice.
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<!--drawable code here-->
</item>
</layer-list>
Removing this solved it for me. The error displayed by Android Studio pointed nowhere near it.
Keep "drawable" file in "res" folder Just cut drawable folder and paste it into res folder
In my case the problem caused by two problems, I scared about destroying all my project but it was two simple things, the first which I didn't take care of was naming a drawable something which Android Studio itself may use somewhere which in my case was border.xml
, when I created this drawable and then I write some other codes and then I tried to run my project but it couldn't read any of my drawables, so I scared about my project, but then I remembered that this word (border)
is something special Android Studio itself may use it in some locations, So I just changed the name to simple_border.xml
and then the second problem was just putting two xml defining lines in a single xml file like:-
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
So don't scare about this problem, just do some cleaning staff, and remember what did you do in the last coding while, and also don't forget about the naming problem, don't use something special that you think Android Studio itself may use, and also check the last edited xml files for this problem which is duplicating the xml defining line, Hope it helps.
Looks like the file res/layout/earn_credits_list_item.xml is trying to reference a drawable that is not present. This resource used to exist in support library < 23.2.0 (and briefly in 23.2.1), but was renamed to abc_ic_ab_back_material in 23.2.0 and in 24.0.0 onward.
If you're using support library > 24.0.0 (which you probably are) rename abc_ic_ab_back_mtrl_am_alpha to abc_ic_ab_back_material.
In my case, cause of the error was the missing closing tag in one of my vector drawable. Check whether your xml based drawables have valid format. Misleading is fact that compiler generates many errors pointing to valid drawables, whereas problem may be in only one drawable. Check this answer for more.
That didn't fix it, the only way I got it to work was by Uninstalling Android Studio 3.0 and installs 2.3 now it works fine!