Android 中缺少启动器图标
Launcher icon missing in Android
当我执行应用程序时它运行完美,但问题是我在模拟器上的任何地方都看不到图标,我猜它必须与清单有关。
清单
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.cade"
android:installLocation="auto"
android:versionCode="1"
android:versionName="CADE Codigos" >
<uses-sdk
android:minSdkVersion="7"
android:targetSdkVersion="8" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="com.android.browser.permission.READ_HISTORY_BOOKMARKS" />
<uses-permission android:name="com.android.browser.permission.WRITE_HISTORY_BOOKMARKS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-feature
android:name="android.hardware.touchscreen"
android:required="true" />
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true" />
<application
android:icon="@drawable/iconcopia"
android:label="CADE Códigos" >
<!-- android:debuggable="false" -->
<activity
android:name=".codigos.ui.activities.MainActivity"
android:configChanges="keyboardHidden|orientation"
android:label="CADE Códigos"
android:launchMode="singleTask" >
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT"
<!-- <category android:name="android.intent.category.BROWSABLE" /> -->
<data android:scheme="http" />
<data android:scheme="https" />
</intent-filter>
</activity>
<activity
android:name=".codigos.ui.activities.AboutActivity"
android:label="@string/AboutActivity.Title"
android:theme="@android:style/Theme.Dialog" />
<activity
android:name=".codigos.ui.activities.EditBookmarkActivity"
android:label="@string/EditBookmarkActivity.Title"
android:theme="@android:style/Theme.Dialog" />
<activity android:name=".codigos.ui.activities.BookmarksListActivity" />
<activity android:name=".codigos.ui.activities.HistoryListActivity" />
<activity android:name=".codigos.ui.activities.DownloadsListActivity" />
<activity android:name=".codigos.ui.activities.AdBlockerWhiteListActivity" />
<activity
android:name=".codigos.ui.activities.BookmarksHistoryActivity"
android:configChanges="keyboardHidden|orientation" />
<activity
android:name=".codigos.ui.activities.ChangelogActivity"
android:label="@string/ChangelogActivity.Title"
android:theme="@android:style/Theme.Dialog" />
<activity android:name=".codigos.ui.activities.preferences.PreferencesActivity" />
<activity
android:name=".codigos.ui.activities.preferences.HomepagePreferenceActivity"
android:label="@string/HomepagePreferenceActivity.Title"
android:theme="@android:style/Theme.Dialog" />
<activity
android:name=".codigos.ui.activities.preferences.SearchUrlPreferenceActivity"
android:label="@string/SearchUrlPreferenceActivity.Title"
android:theme="@android:style/Theme.Dialog" />
<activity
android:name=".codigos.ui.activities.preferences.UserAgentPreferenceActivity"
android:label="@string/UserAgentPreferenceActivity.Title"
android:theme="@android:style/Theme.Dialog" />
<activity android:name=".codigos.ui.activities.MobileViewListActivity" />
<activity android:name=".codigos.ui.activities.WeaveBookmarksListActivity" />
<activity android:name=".codigos.ui.activities.preferences.WeavePreferencesActivity" />
<activity
android:name=".codigos.ui.activities.preferences.WeaveServerPreferenceActivity"
android:label="@string/WeaveServerPreferenceActivity.Title"
android:theme="@android:style/Theme.Dialog" />
<provider
android:name=".codigos.providers.ZircoBookmarksContentProvider"
android:authorities="org.cade.codigos.providers.zircobookmarkscontentprovider" />
<provider
android:name=".codigos.providers.WeaveContentProvider"
android:authorities="org.cade.codigos.providers.weavecontentprovider" />
<receiver android:name=".codigos.utils.ProxyChangeReceiver" >
<intent-filter>
<action android:name="android.intent.action.PROXY_CHANGE" />
</intent-filter>
</receiver>
<activity
android:name=".codigos.ui.activities.RequestDataForm"
android:label="@string/title_activity_request_data_form" >
</activity>
</application>
</manifest>
备注
如果您需要我的申请中的任何其他信息,我也会post在这里,非常感谢您。
您的主要 activity 需要添加一个启动器 intent,类似这样。
<activity
android:name=".MainActivity"
android:label="Title">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<!-- <category android:name="android.intent.category.BROWSABLE" /> -->
<data android:scheme="http" />
<data android:scheme="https" />
</intent-filter>
</activity>
当我执行应用程序时它运行完美,但问题是我在模拟器上的任何地方都看不到图标,我猜它必须与清单有关。
清单
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.cade"
android:installLocation="auto"
android:versionCode="1"
android:versionName="CADE Codigos" >
<uses-sdk
android:minSdkVersion="7"
android:targetSdkVersion="8" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="com.android.browser.permission.READ_HISTORY_BOOKMARKS" />
<uses-permission android:name="com.android.browser.permission.WRITE_HISTORY_BOOKMARKS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-feature
android:name="android.hardware.touchscreen"
android:required="true" />
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true" />
<application
android:icon="@drawable/iconcopia"
android:label="CADE Códigos" >
<!-- android:debuggable="false" -->
<activity
android:name=".codigos.ui.activities.MainActivity"
android:configChanges="keyboardHidden|orientation"
android:label="CADE Códigos"
android:launchMode="singleTask" >
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT"
<!-- <category android:name="android.intent.category.BROWSABLE" /> -->
<data android:scheme="http" />
<data android:scheme="https" />
</intent-filter>
</activity>
<activity
android:name=".codigos.ui.activities.AboutActivity"
android:label="@string/AboutActivity.Title"
android:theme="@android:style/Theme.Dialog" />
<activity
android:name=".codigos.ui.activities.EditBookmarkActivity"
android:label="@string/EditBookmarkActivity.Title"
android:theme="@android:style/Theme.Dialog" />
<activity android:name=".codigos.ui.activities.BookmarksListActivity" />
<activity android:name=".codigos.ui.activities.HistoryListActivity" />
<activity android:name=".codigos.ui.activities.DownloadsListActivity" />
<activity android:name=".codigos.ui.activities.AdBlockerWhiteListActivity" />
<activity
android:name=".codigos.ui.activities.BookmarksHistoryActivity"
android:configChanges="keyboardHidden|orientation" />
<activity
android:name=".codigos.ui.activities.ChangelogActivity"
android:label="@string/ChangelogActivity.Title"
android:theme="@android:style/Theme.Dialog" />
<activity android:name=".codigos.ui.activities.preferences.PreferencesActivity" />
<activity
android:name=".codigos.ui.activities.preferences.HomepagePreferenceActivity"
android:label="@string/HomepagePreferenceActivity.Title"
android:theme="@android:style/Theme.Dialog" />
<activity
android:name=".codigos.ui.activities.preferences.SearchUrlPreferenceActivity"
android:label="@string/SearchUrlPreferenceActivity.Title"
android:theme="@android:style/Theme.Dialog" />
<activity
android:name=".codigos.ui.activities.preferences.UserAgentPreferenceActivity"
android:label="@string/UserAgentPreferenceActivity.Title"
android:theme="@android:style/Theme.Dialog" />
<activity android:name=".codigos.ui.activities.MobileViewListActivity" />
<activity android:name=".codigos.ui.activities.WeaveBookmarksListActivity" />
<activity android:name=".codigos.ui.activities.preferences.WeavePreferencesActivity" />
<activity
android:name=".codigos.ui.activities.preferences.WeaveServerPreferenceActivity"
android:label="@string/WeaveServerPreferenceActivity.Title"
android:theme="@android:style/Theme.Dialog" />
<provider
android:name=".codigos.providers.ZircoBookmarksContentProvider"
android:authorities="org.cade.codigos.providers.zircobookmarkscontentprovider" />
<provider
android:name=".codigos.providers.WeaveContentProvider"
android:authorities="org.cade.codigos.providers.weavecontentprovider" />
<receiver android:name=".codigos.utils.ProxyChangeReceiver" >
<intent-filter>
<action android:name="android.intent.action.PROXY_CHANGE" />
</intent-filter>
</receiver>
<activity
android:name=".codigos.ui.activities.RequestDataForm"
android:label="@string/title_activity_request_data_form" >
</activity>
</application>
</manifest>
备注
如果您需要我的申请中的任何其他信息,我也会post在这里,非常感谢您。
您的主要 activity 需要添加一个启动器 intent,类似这样。
<activity
android:name=".MainActivity"
android:label="Title">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<!-- <category android:name="android.intent.category.BROWSABLE" /> -->
<data android:scheme="http" />
<data android:scheme="https" />
</intent-filter>
</activity>