Android应用没有启动图标

时间:2013-11-07 19:54:03

标签: java android

一直在处理我的应用程序,我有3个图标,因为我列出了3个具有动作MAIN的意图过滤器。尝试修复它,现在我在安装应用程序时没有图标。知道为什么我的应用程序没有图标吗?

清单

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.myAppName"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk android:minSdkVersion="8"
    android:targetSdkVersion="18" />

<!--
android:targetSdkVersion="17"
 android:targetSdkVersion="17"   
    android:configChanges="orientation|screenSize"
-->
<permission android:name="com.myAppName.permission.C2D_MESSAGE" android:protectionLevel="signature" />
<uses-permission android:name="com.myAppName.permission.C2D_MESSAGE" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />


<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_CONTACTS" >
</uses-permission>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.SEND_SMS" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.CAMERA"/>

<!-- GCM requires a Google account. -->
<uses-permission android:name="android.permission.GET_ACCOUNTS" />

<!-- Keeps the processor from sleeping when a message is received. -->
<uses-permission android:name="android.permission.WAKE_LOCK" />

<!-- Creates a custom permission so only this app can receive its messages. -->


<uses-permission android:name="com.myAppName.permission.C2D_MESSAGE" />
<uses-permission android:name="com.myAppName.activity.permission.C2D_MESSAGE" />

<!-- This app has permission to register and receive data message. -->
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />

<!-- Network State Permissions to detect Internet status -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

<!-- Permission to vibrate -->
<uses-permission android:name="android.permission.VIBRATE" />

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:screenOrientation="portrait"
    android:theme="@android:style/Theme.Black.NoTitleBar" >
    <activity
        android:name="com.myAppName.SplashScreen"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity
        android:name="com.myAppName.ActivityLogin"
        android:screenOrientation="portrait" >
    </activity>
    <activity
        android:name="com.myAppName.ActivityBonus"
        android:screenOrientation="portrait" >
    </activity>
    <activity
        android:name="com.myAppName.ActivityPersonalRewardsGfits"
        android:screenOrientation="portrait" >
    </activity>
    <activity
        android:name="com.myAppName.ActivityRestaurantDetails"
        android:screenOrientation="portrait" >
    </activity>
    <activity
        android:name="com.myAppName.ActivityRestaurantSearch"
        android:screenOrientation="portrait" >
    </activity>
    <activity
        android:name="com.myAppName.TabManager"
        android:screenOrientation="portrait" >
    </activity>
    <activity
        android:name="com.myAppName.SearchGroupsActivity"
        android:screenOrientation="portrait" >
    </activity>
    <activity
        android:name="com.myAppName.TabGroupActivity"
        android:screenOrientation="portrait" >
    </activity>
    <activity
        android:name="com.myAppName.ActivityRegister"
        android:screenOrientation="portrait" >
    </activity>
    <activity
        android:name="com.myAppName.ActivityRestaurantRewards"
        android:screenOrientation="portrait" >
    </activity>
    <activity
        android:name="com.myAppName.ActivityMore"
        android:screenOrientation="portrait" >
    </activity>
    <activity
        android:name="com.myAppName.ActivitySocialConnect"
        android:screenOrientation="portrait" >
    </activity>
    <activity
        android:name="com.myAppName.ActivityAddFriends"
        android:screenOrientation="portrait" >
    </activity>
    <activity
        android:name="com.myAppName.ActivitySharing"
        android:screenOrientation="portrait" >
    </activity>
    <activity
        android:name="com.myAppName.ActivityYourGift"
        android:screenOrientation="portrait" >
    </activity>
    <activity
        android:name="com.myAppName.FriendGroupActivity"
        android:screenOrientation="portrait" >
        <intent-filter>
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity
        android:name="com.myAppName.ActivityAddFriendsForSearchRestaurants"
        android:screenOrientation="portrait" >
    </activity>

    <!-- GCM -->
    <receiver
        android:name="com.google.android.gcm.GCMBroadcastReceiver"
        android:permission="com.google.android.c2dm.permission.SEND" >
        <intent-filter>

            <!-- Receives the actual messages. -->
            <action android:name="com.google.android.c2dm.intent.RECEIVE" />
            <!-- Receives the registration id. -->
            <action android:name="com.google.android.c2dm.intent.REGISTRATION" />

            <category android:name="com.myAppName" />
        </intent-filter>
    </receiver>


    <service android:name=".GCMIntentService" />
    <!-- end of GCM -->
    <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/app_id"/>
    <activity android:name="com.facebook.LoginActivity"></activity>

</application>

1 个答案:

答案 0 :(得分:7)

首先,从<category android:name="android.intent.category.LAUNCHER" />移除FriendGroupActivity。你不需要它,它不太可能有所帮助。

其次,完全卸载并重新安装应用程序,再重新启动设备或模拟器。更改启动器活动的组合是意外行为,因此可能需要一些哄骗才能让所有内容显示出来。

第三,如果活动名称SplashScreen是文字,请摆脱它。启动画面是一种反模式,浪费了用户的时间。