Android模拟器无法找到Launcher Icon

时间:2013-11-25 13:47:49

标签: android

我创建了一个Android项目。我在我的模拟器上运行这个项目。 并获得一条消息:\ GraphicsAndStyles \ bin \ GraphicsAndStyles.apk安装在设备上

当我打开我的模拟器时,我看不到我的Launcher图标,我无法启动我的应用程序。 任何人都可以帮我解决这个问题吗?

这是我的Manifest中的xml代码:

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

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

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name="com.example.graphicsandstyles.List"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.LIST" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name="com.example.graphicsandstyles.Styles"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>
        <activity
            android:name="com.example.graphicsandstyles.Themes"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.THEMES" />

                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>
    </application>

</manifest>

1 个答案:

答案 0 :(得分:3)

将这两个内容保存在同一活动的intent-filter中,以使图标可见,如下所示:

<intent-filter >  
   <action android:name="android.intent.action.MAIN" />   
   <category android:name="android.intent.category.LAUNCHER"/>  
</intent-filter>  

目前,您将这两个字段分别保存在两个单独的活动中,因此请将其更改为:

<activity
            android:name="com.example.graphicsandstyles.List"
            android:label="@string/app_name" >  
            <intent-filter>  
                <action android:name="android.intent.action.LIST" />  
                <category android:name="android.intent.category.LAUNCHER" />   
            </intent-filter>  
</activity>

您可以找到有关这两个清单标记here

的使用情况的详细信息
相关问题