Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error Building Project in Android Studio "Error: No resource found that matches the given name (at ____ with value '@drawable/<name>')

I've searched all over Google, stackoverflow and other android programming websites, many have suggestions for people who have misplaced files from one folder to another and so forth.. But none that illustrate the problem I'm facing.

It's not a corrupt file as in the case here as I tried this with no success.

The error I'm facing is similar though:

[debug] C:\Users\Name\AppData\Local\Temp\android_manifest_copy6264790980678653632tmp\AndroidManifest.xml:11: error: Error: No resource found that matches the given name (at 'icon' with value '@drawable/ic_launcher').

Similarly, this is happening with an @string element, @style element and another @string, examples below:

'@string/app_name'
'@style/AppTheme'
'@string/app_name'

One thing that I have noticed, and coming from the world of Eclipse, I cannot explain this behavior in Android Studio.. In my 'main' project folder, everything exists and builds correctly for debugging. It seems that Android Studio is trying to build off of a 'debug' folder, which will not build when running 'Build' > 'Rebuild Project'.

Does anyone know where I can place these missing files to get the project to build? Or is this some other problem?

like image 584
MattMakes Avatar asked Jul 27 '13 01:07

MattMakes


1 Answers

My problem is about @drawable/img_1, the pic is JPEG format, while it's extension name is png, I force to rename it jpg extension. Then it builds successfully.

like image 89
Melon Chen Avatar answered Oct 15 '22 21:10

Melon Chen