【问题标题】:Android - No launcher icon after installing apkAndroid - 安装 apk 后没有启动器图标
【发布时间】:2023-10-01 18:09:01
【问题描述】:

我知道这个问题已经被问过很多次了,但是旧的答案并没有解决我的问题,也许有些事情已经改变了。 为什么安装apk后没有启动器图标?

这是 manifest.xml

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

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

    <uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
    <uses-permission android:name="com.android.launcher.permission.UNINSTALL_SHORTCUT" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.FLASHLIGHT" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name="xx.xx.xx.xx.MyActivity"
            android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
            android:icon="@drawable/ic_launcher"
            android:label="@string/app_name"
            android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name="xx.xx.xx.xx.Configuration"
            android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
            android:label="@string/title_activity_configuration"
            android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
        </activity>
        <activity
            android:name="xx.xx.xx.xx.xx"
            android:label="@string/title_activity_login" >
        </activity>
    </application>

</manifest>

有什么问题?请指导。

【问题讨论】:

  • 检查此运行 ==> 编辑配置 ==> 启动选项 ==> xx.xx.xx.xx.MyActivity
  • 确保清除应用缓存并重新安装应用。
  • 启动器图标应该出现在 mipmap 文件夹中,而不是在 drawable 文件夹中。请检查此链接*.com/questions/23935810/mipmap-drawables-for-icons

标签: android apk android-manifest


【解决方案1】:

应用程序图标应该在minmap 这样

  • minmap-mdpi/ic_launcher
  • minmap-hdpi/ic_launcher
  • minmap-xhdpi/ic_launcher
  • minmap-xxhdpi/ic_launcher
  • minmap-xxxdpi/ic_launcher

不在Drawable,所以请更改它。并检查图标大小。

试试这个链接来制作应用图标 https://makeappicon.com/

【讨论】:

  • 它应该在 minmap 文件夹中,但它也适用于 drawable。
  • 它会工作,但最好使用 minmap 并请检查图标大小
  • 我使用 makeappicon.com 创建图标,创建文件夹并设置 android:icon="@mipmap/ic_launcher",但不起作用
  • android:icon="@minmap/ic_launcher" 仅将其应用于应用程序,在其他位置删除,尝试并让我知道
最近更新 更多