The program icon does not appear in the mobile desktop or app/widgets view after Android real-computer program is installed

Source: Internet
Author: User

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
  1. <activity android:name=". Accountmanageactivity ">
  2. <intent-filter>
  3. <action android:name="Android.intent.action.MAIN" />
  4. <category android:name="Android.intent.category.LAUNCHER" />
  5. <data android:scheme="Aone" android:host="accountmanageactivity" />
  6. </intent-filter>
  7. </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
  1. <activity android:name=". Accountmanageactivity ">
  2. <intent-filter>
  3. <action android:name="Android.intent.action.MAIN" />
  4. <category android:name="Android.intent.category.LAUNCHER" />
  5. </intent-filter>
  6. <intent-filter>
  7. <data android:scheme="Aone" android:host="accountmanageactivity" />
  8. </intent-filter>
  9. </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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.