简体   繁体   中英

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?

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).

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

您的绘图文件中缺少“ ic_launcher”,只需添加一个或删除代码行即可。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM