[英]Android Emulator can't find Launcher Icon
我創建一個Android項目,並在模擬器上運行該項目。 並獲得一條消息:\\ GraphicsAndStyles \\ bin \\ GraphicsAndStyles.apk安裝在設備上
打開模擬器時,我看不到啟動器圖標,也無法啟動應用程序。 有人可以幫我嗎?
這是我的清單中的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>
將它們都保留在同一活動的意圖過濾器中,以使圖標可見,如下所示:
<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>
您可以在此處找到有關這兩個清單標簽用法的詳細信息。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.