android 中的应用程序菜单中未显示应用程序图标

app icon is not showing in app menu in android

当我 运行 我的来自 android studio 的应用程序正在安装时,应用程序菜单中没有显示图标。它仅显示在主屏幕中。我没有改变任何东西。一切都很好,突然这个问题开始了。我挣扎了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>

问题是 <data android:scheme="file" />,您不能在启动器 activity 中合理地使用此标签。

设置 activity 是否应该是对一条数据执行的默认操作(按中心)的选项。设置此项将在对某些数据执行操作时向用户隐藏任何未设置的活动。请注意,这是正常的 - 未在启动操作时在 Intent 中设置 - 它用于包中指定的 Intent 过滤器。