user1953907
user1953907

Reputation: 323

Error in AndroidManifest.xml File of an Android Project With Default Values

I currently deal with a tutorial for beginners to build my first Android application in Eclipse. I created a new Android project with default values. Next, Eclipse reports an error in the AndroidManifest.xml file. Here is the line producing the error:

android:icon="@drawable/ic_launcher"

This is the error message: error: Error: No resource found that matches the given name (at 'icon' with value '@drawable/ic_launcher').

How do I fix this?

Upvotes: 1

Views: 1384

Answers (3)

safaiyeh
safaiyeh

Reputation: 1715

You are missing "ic_launcher" in your draw able files, simply add one or remove the line of code.

Upvotes: 1

Stephan Branczyk
Stephan Branczyk

Reputation: 9375

Change ic_launcher to the name of the icon which is located in your project/res/drawable/ folder

This is a common error in Android. At some point, the Android new Project Wizard changed the default name it would give to the application icon (and some tutorials are still using the old name).

Please read more about Android fundamentals, so you can figure out how things are organized. A drawable is a resource. Resources are located in the res/ folder (although, resources are indexed in a R file which is automatically generated before everything gets compiled).

Upvotes: 4

hichris123
hichris123

Reputation: 10223

What it is saying is that there is no file drawable/ic_launcher. To fix this, simply create a drawable named ic_launcher.

Upvotes: 2

Related Questions