This article mainly describes several possible reasons why the icon does not appear after the Android app is installed .
The program you wrote suddenly disappeared after the installation, can be found in the application installation, but the desktop is no icon, start only from the most recent list of them. Typically this happens only in service class programs and test programs, because icons are not required.
Mobile phone is ZTE Mobile phone, after trying to change the Android API version, icon pictures and other methods still no results, and try to modify the program name, problem solving. The original name is voter, was ZTE Harmony ... Harmony ... The harmonic ... The .... and tried the big name, still don't show the icon .... Want to cry without tears ....
Other possible causes on the network:
1. Application element property setting problem in Androidmanifest
Property Set Error
<application android:icon= "@drawable/icon" android:label= "@string/app_name" >
Icon is set, and the top icon resource file does not exist
Workaround: Add an icon resource file
2. No activity settings in Androidmanifest Android.intent.category.LAUNCHER category or Android.intent.action.MAIN action
Androidmanifest doesn't have any activity settings.
<category android:name= "Android.intent.category.LAUNCHER"/>
and <action android:name= "Android.intent.action.MAIN"/>
At run time you will find the following message indicating asynchronous execution
[2012-03-25 ...] No Launcher Activity found!
[2012-03-25 ...] The launch would only sync the application package on the device!
The program is already installed in the list, but does not have an icon and does not display the activity execution of the Android.intent.action.MAIN property on the front of the screen.
Workaround: Add these two attributes to the main activity
For more information about the meanings of these two properties, please refer to:
3, main Intent-filter also configured a different kind of action and data, configured as follows :
XML code
- <activity android:name=". Accountmanageactivity ">
- <intent-filter>
- <action android:name="Android.intent.action.MAIN" />
- <category android:name="Android.intent.category.LAUNCHER" />
- <data android:scheme="Aone" android:host="accountmanageactivity" />
- </intent-filter>
- </activity>
Some netizens say this way can not start, but after their own test can start just do not show the icon
solution: divided into two intent-filter, as follows
XML code
- <activity android:name=". Accountmanageactivity ">
- <intent-filter>
- <action android:name="Android.intent.action.MAIN" />
- <category android:name="Android.intent.category.LAUNCHER" />
- </intent-filter>
- <intent-filter>
- <data android:scheme="Aone" android:host="accountmanageactivity" />
- </intent-filter>
- </activity>
Because intent-filter indicates what kind of intent the activity accepts, the conditions defined in one intent-filter must be met in order to start with that intent-filter, or else follow the other intent-filter. And the above is obviously two kinds of starting mode, so must be separated. With this introduction you can know that other action, category, data conflicts can also cause this problem