Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
374 views
in Technique[技术] by (71.8m points)

sdk - Android application icon not showing up

I've just spent numerous hours constructing an icon for an Android app I'm working on, but can't get it to show up for the app in the emulator.

I've put it in res/drawable-hdpi, res/drawable-mdpi, res/drawable-ldpi in the respective sizes as defined in http://developer.android.com/guide/practices/ui_guidelines/icon_design_launcher.html

The manifest contains the line:

 <application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="true">

Any ideas as to why it isn't showing up?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
  1. Make sure the icon is stored with the name icon.png in those folders.
  2. Make sure android has a drawable/icon resource. Check this by looking at your gen/R.java file and seeing public static final int icon = 0x.... in the drawable inner class.
  3. Try cleaning your project build and uninstalling any existing version of your app from your phone/emulator and then reinstall the new version.

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...