当我从Android工作室运行我的应用程序时,应用程序正在安装,但应用程序菜单中没有显示图标。它只显示在主屏幕上。我没有改变任何明显的东西。一切都很好,突然这个问题开始了。我正在努力奋斗3个小时。它很烦人。如果您看到这些图片,您就会明白。
请参阅第一张照片中缺少的Beat Box图标。为什么会这样?
我最明确的代码:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="prime.beatbox"
android:installLocation="auto">
<uses-sdk android:minSdkVersion="16" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<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-permission android:name="android.permission.READ_PHONE_STATE" />
<application
android:allowBackup="true"
android:icon="@drawable/download"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
<activity
android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
android:theme="@android:style/Theme.Translucent" />
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:launchMode="singleTask"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="android.intent.action.MEDIA_MOUNTED" />
<data android:scheme="file" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".Player"
android:label="@string/title_activity_player"
android:launchMode="singleTask"
android:screenOrientation="portrait" >
</activity>
<service
android:name=".EgineBackground"
android:enabled="true" >
</service>
<activity
android:name=".Statistics"
android:label="@string/title_activity_statistics"
android:launchMode="singleTask"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".AlbumItems"
android:label="@string/title_activity_album_items"
android:launchMode="singleTask"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".ArtistAlbum"
android:label="@string/title_activity_artist_album"
android:launchMode="singleTask"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".AnimationTest"
android:label="@string/title_activity_animation_test"
android:launchMode="singleTask"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".DataBase"
android:label="@string/title_activity_data_base"
android:launchMode="singleTask"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".EqualizerLocal"
android:label="@string/title_activity_equalizer"
android:launchMode="singleTask"
android:screenOrientation="portrait" >
</activity>
<receiver
android:name=".EgineBackground$PreviousButtonListener"
android:enabled="true" >
</receiver>
<receiver
android:name=".EgineBackground$NextButtonListener"
android:enabled="true" >
</receiver>
<receiver
android:name=".EgineBackground$PlayButtonListener"
android:enabled="true" >
</receiver>
<receiver
android:name=".EgineBackground$CancelButtonListener"
android:enabled="true" >
</receiver>
<receiver
android:name=".NewAppWidget$NextButtonListenerNotification"
android:enabled="true" >
</receiver>
<receiver
android:name=".NewAppWidget$PlayButtonListenerNotification"
android:enabled="true" >
</receiver>
<receiver
android:name=".NewAppWidget$GoToApp"
android:enabled="true" >
</receiver>
<receiver
android:name=".EgineBackground$CallDetector"
android:enabled="true" >
<intent-filter>
<action android:name="android.intent.action.PHONE_STATE" />
</intent-filter>
</receiver>
<activity
android:name=".Themes"
android:label="@string/title_activity_themes" >
</activity>
<activity
android:name=".sleep"
android:label="@string/title_activity_sleep" >
</activity>
<activity
android:name=".Favourite"
android:label="@string/title_activity_favourite" >
</activity>
<activity
android:name=".PhoneMemory"
android:label="@string/title_activity_phone_memory" >
</activity>
<receiver android:name=".NewAppWidget" >
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/new_app_widget_info" />
</receiver>
<activity
android:name=".MyFolders"
android:label="@string/title_activity_my_folders" >
</activity>
<activity
android:name=".CardMemory"
android:label="@string/title_activity_card_memory" >
</activity>
<activity
android:name=".PlayList"
android:label="@string/title_activity_play_list" >
</activity>
<activity
android:name=".PlaylistDetails"
android:label="@string/title_activity_playlist_details" >
</activity>
<activity
android:name=".SongDetails"
android:label="@string/title_activity_song_details" >
</activity>
<activity
android:name=".SearchBox"
android:label="@string/title_activity_search_box"
android:windowSoftInputMode="adjustPan" >
</activity>
<activity
android:name=".SearchAlbum"
android:label="@string/title_activity_search_album" >
</activity>
<activity
android:name=".About"
android:label="@string/title_activity_about" >
</activity>
</application>
</manifest>
答案 0 :(得分:5)
问题是<data android:scheme="file" />
,您无法在启动器活动中逻辑地使用此标记。
设置活动是否应该是默认操作(中心按)对一段数据执行的选项。设置此项将在用户对某些数据执行操作时未设置任何活动时向用户隐藏。请注意,在启动操作时,这在Intent中是正常设置 - 它用于在包中指定的intent过滤器。