No resource found that matches the given name

No resource found that matches the given name

Error : No resource found that matches the given name (at ‘icon’ with value ‘@drawable/icon’)

Error : No resource found that matches the given name (at ‘icon’ with value ‘@drawable/icon’).

This is my manifest. I’m extremely new to this, just started this morning and have no previous programming experience.

14 Answers 14

Trending sort

Trending sort is based off of the default sorting method — by highest score — but it boosts votes that have happened recently, helping to surface more up-to-date answers.

It falls back to sorting by highest score if no posts are trending.

Switch to Trending sort

Found this question. I was importing an old project into android studio and got the error.

The issue was eventually answered for me here mipmap drawables for icons

In the manifest it has

but @drawable has been superseded by @mipmap so needed changing to:

I put this answer here, as it may become a more common issue.

If you are 100% sure that directories and files are ok, have a look at the project location.

There is a limit on the path length of files in the Operating System. Perhaps this limit is being exceded in your project files.

Move the project to a shorter folder (say C:/MyProject) and try again!

This was the problem for me!

I’ve spent on this problem much time and as for me (for Intellij IDEA) the solution is to specify right path to res directory:

And don’t forget to check all the paths in this tab!

I hope it will be helpful for somebody!

Remove this line from your manifest:

You have two application tags only one should be present.

No resource found that matches the given name. Смотреть фото No resource found that matches the given name. Смотреть картинку No resource found that matches the given name. Картинка про No resource found that matches the given name. Фото No resource found that matches the given name

You need to add icon.png through visual.

Resouces. / Dravable/ Add ///

Insert a new icon 72×72 icon on the hdpi folder with a different name from the original, and update the name on the manifest also.

The icon somehow resurrects on the Gen file and voila!! time to move on.

No resource found that matches the given name. Смотреть фото No resource found that matches the given name. Смотреть картинку No resource found that matches the given name. Картинка про No resource found that matches the given name. Фото No resource found that matches the given name

This happens when you have previously changed your icon or the ic_launcher; and when that ic_launcher no longer exists in your base folder.

Try adding a png image and giving the same name and then copy it to your drawable folder.Now re build the project.

No resource found that matches the given name. Смотреть фото No resource found that matches the given name. Смотреть картинку No resource found that matches the given name. Картинка про No resource found that matches the given name. Фото No resource found that matches the given name

i had this problem. i created a picture for my background with jpg format. before added this picture, i changed the format to png with rename the format. and then i got this error like you. i changed my format picture with picture editor like photoshop to png and replaced it with picture in my project and then i hadnt that error. sory for bad english

No resource found that matches the given name. Смотреть фото No resource found that matches the given name. Смотреть картинку No resource found that matches the given name. Картинка про No resource found that matches the given name. Фото No resource found that matches the given name

if cordova app copy a valid png file to

In my case, I use Xamarin with Visual Studio 2013. I create Blank App (Android) then deploy without any code update.

Make sure that icon.png (or whatever files mentioned in the application android:icon tag) is present in the drawable-hdpi folder inside res folder of Android project.

If it shows the error even if the icon.png is present,then remove the statement application android:icon from the AndroidManifest.xml and add it again.

Check your project folder’s path. If it is too long, or contains space, or contains any unicode character, try to relocated.

no resource found that matches the given name

is my AndroidManifest.xml and in lines 8 & 11 I get the error:

no resource found that matches the given name(at «label» with value «@string/app_name»)

no resource found that matches the given name(at «label» with value «@string/app_name»)

This is really strange and I did not move the values Folder anywhere.

6 Answers 6

Trending sort

Trending sort is based off of the default sorting method — by highest score — but it boosts votes that have happened recently, helping to surface more up-to-date answers.

It falls back to sorting by highest score if no posts are trending.

Switch to Trending sort

Did you check to ensure that you have the string resource defined in res/values/strings.xml?

One Reason Can Be as in my case a bug in the string GUI when you add and delete items in some sequence

solution: simply open the strings.xml in the XML mode not GUI you will find it different and has obvious not valid extra texts pasted around or at the beginning ; although it does not give an error on the file strings.xml fix them and then clean and run

Just add the above line «config.xml» inside. Bottom of platform android. Working perfectly. After many hours I got this solution.

Enjoy your coding.

The fix for this is to make sure your Cordova CLI is updated to the latest, then start a new app (or re-add the android platform).

If you plan to use cordova-android 6, these are the changes you’ll need to make to your config.xml:

replace this line:

replace this line:

I’ve had the same problem. Remove «@string» from android:label=»@string/app_name» and it will work fine.

Android xml error: «No resource found that matches the given name» with RelativeLayout (@id/LinearLayout_acc, @id/ProgressBar_statusScreen)

Okay, so this is starting to really annoy me. This error pops up in a very special, not very logical way.

Let me start out by saying that I have already looked at the other questions regarding this error, Google’d it too. As far as I can tell, most similar problems occur because people refer to a String resource or something else not within the same layout file, they misplace the ‘+’ in ‘@id+’ or something similar.

It should be simple enough and looks as if it works, i.e. the graphic view shows the desired result. However, and here comes the problem, Eclipse gives me an error on the two linear layouts,

«Error: No resource found that matches the given name (at ‘layout_above’ with value ‘@id/LinearLayout_acc’).»

and the same error for the other linear layout referring to the progress bar. I have more than triple checked that there are no typos (the id’s also exist in packagename.R.java), and I have tried cleaning the project a dozen times.

I don’t get the error when saving (and auto building), not until I decide to run the project. Another weird thing is that when I refer to the bottom linear layout from the progress bar instead of the top linear layout, I get no error!

Please help, I have no idea what causes this error!

Edit with answers

I made most of the design and set the referred id’s in Eclipse’s graphical editor, so code that resulted in an error message was automatically inserted. Maybe this is a bug in Eclipse.

No resource found that matches the given name (at ‘icon’ with value ‘@mipmap/ic_launcher.png’)

No resource found that matches the given name. Смотреть фото No resource found that matches the given name. Смотреть картинку No resource found that matches the given name. Картинка про No resource found that matches the given name. Фото No resource found that matches the given nameI changed launcher icons in my application. The images I added are of PNG format. But when i clean and build my project, it is giving below error.

No resource found that matches the given name (at ‘icon’ with value ‘@mipmap/ic_launcher.png’).

Below is my AndroidManifest.xml

7 Answers 7

Trending sort

Trending sort is based off of the default sorting method — by highest score — but it boosts votes that have happened recently, helping to surface more up-to-date answers.

It falls back to sorting by highest score if no posts are trending.

Switch to Trending sort

remove the file’s extensions from android:icon

and please make sure that you have ic_launcher.png in the mipmap folder

From the screenshot you posted it looks like you are editing the wrong manifest file. Please be sure of editing the one under src/main/manifests

No resource found that matches the given name. Смотреть фото No resource found that matches the given name. Смотреть картинку No resource found that matches the given name. Картинка про No resource found that matches the given name. Фото No resource found that matches the given name

Check if these settings are point to the right directory

No resource found that matches the given name. Смотреть фото No resource found that matches the given name. Смотреть картинку No resource found that matches the given name. Картинка про No resource found that matches the given name. Фото No resource found that matches the given name

This panel is—>project structure—>facets.

No resource found that matches the given name. Смотреть фото No resource found that matches the given name. Смотреть картинку No resource found that matches the given name. Картинка про No resource found that matches the given name. Фото No resource found that matches the given name

I recently came to an solution just open the «android\app\src\main\AndroidManifest» in android studio or whatever editor you have and edit «ic_launcher» with your icon name then error will be gone and app gets your custom icon

No resource found that matches the given name. Смотреть фото No resource found that matches the given name. Смотреть картинку No resource found that matches the given name. Картинка про No resource found that matches the given name. Фото No resource found that matches the given name

No resource found that matches the given name. Смотреть фото No resource found that matches the given name. Смотреть картинку No resource found that matches the given name. Картинка про No resource found that matches the given name. Фото No resource found that matches the given name

(Had the same issue because the error appears on AUTOMATICALLY generated manifest, new one)

No resource found that matches the given name. Смотреть фото No resource found that matches the given name. Смотреть картинку No resource found that matches the given name. Картинка про No resource found that matches the given name. Фото No resource found that matches the given name

If you replaced the default icon with your own icon set, make sure to also provide a round icon of your app logo with the name ic_launcher_round.png in all of these folders.

Hopefully the error should resolve.

keep your icons to mipmap-hdpi or mipmap-mdpi folders etc. Do not keep your app icon to plane «mipmap» folder

if you’ve manipulated attributes on the MainActvity class make sure the icon value doesn’t contain an extension

Common problem I’m sure, but I can’t figure it out. In my AndroidManifest.xml and main.xml I’m getting the no resource found that matches the given name. I’ve double checked for typos and it used to work, but now I’m popping up with all these errors saying it can’t find my strings in my strings.xml.

These are the ones I’m getting errors for in my main.xml.

These are the ones I’m getting for my androidmanifest.xml.

This is what my strings.xml looks like.

Any ideas? Any help would be appreciated!!

15 Answers 15

Trending sort

Trending sort is based off of the default sorting method — by highest score — but it boosts votes that have happened recently, helping to surface more up-to-date answers.

It falls back to sorting by highest score if no posts are trending.

Switch to Trending sort

Accidentally moved the «values» folder outside of the «res» folder. Moved it back and it fired up!

I resolved this kind of issue like this: I went into my XML layout file, cut the line of code that was generating the error. Then I saved the file, and pasted the code back in. The error was gone.

One general solution to such tiny errors is that you close eclipse and start is again.. 3 irritating problems were solved.. its the problem with eclipse.. some times it didn resolve «R.id», the it didn find @string/somebutton, and then again some random thing. if nothing logical comes in your mind, try this, n conjure d result.. 🙂

No resource found that matches the given name. Смотреть фото No resource found that matches the given name. Смотреть картинку No resource found that matches the given name. Картинка про No resource found that matches the given name. Фото No resource found that matches the given name

I think the issue is that you have

and you don’t have any string with the id, to refer to the array, you need to use @array

test this or put a screen of your log please

I renamed the file in res/values «strings.xml» to «string.xml» (no ‘s’ on the end), cleaned and rebuilt without error.

I actually has this problem once with a path issue referring another project :

I had this in my default.properties:

Which I fixed like this:

My colleague created the above with Windows but only the version below worked on my Mac.

If you are an iPhone Developer don’t just add your picture (by right clicking then add file. like we do in iPhone). You have to copy and paste the picture in your drawable folder.

No resource found that matches the given name. Смотреть фото No resource found that matches the given name. Смотреть картинку No resource found that matches the given name. Картинка про No resource found that matches the given name. Фото No resource found that matches the given name

Источники информации:

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *