无法更改我的Android应用的图标

时间:2016-12-14 17:12:39

标签: android android-studio android-manifest

首先,我将一些图标复制到mipmap(名为ic_launcher.png) - 没有用。

其次我右键点击res>new>image asset - 也没有用。

我的manifest.xml代码为。

 <application
    android:name=".BlogI"
    android:allowBackup="true"
    android:icon="@mipmap/applicationicon"  // This even shows the right icon in right corner along with the line numbers
    android:label="@string/app_name"
    ......
    ......

我尝试了清理项目并重新运行,重新启动我的android工作室(甚至我的PC)也重新启动了我的Android设备。但是,以上都没有奏效。在提出这个问题之前,我尝试过其他类似的问  Like this one.

如果有任何替代品,请建议!谢谢!

4 个答案:

答案 0 :(得分:1)

生成图像资产时,删除 ic_launcher.xml,但保留 png文件。 xml文件具有ic_launcher_foreground属性,该属性会覆盖默认的android启动器图标。

答案 1 :(得分:0)

首先将您的图片粘贴到drawable,然后在manifest.xml

中添加以下代码
 <application
        android:name=".BlogI"
        android:allowBackup="true"
        android:icon="@drawable/your_Image"
        android:label="@string/app_name">`

它对我有用。

答案 2 :(得分:0)

我终于找到了解决办法!我的第三方发射器(Evie Launcher)没有更新图标。在我更换发射器后,这些图标在我的所有设备上运行良好。

感谢所有建议和答案。

答案 3 :(得分:-1)

终于找到了我很久以来的错误。

请确保已在AndroidMainfest.xml中同时设置了两个属性-android:iconandroid:roundIcon

<application
    android:icon="@mipmap/app_icon"
    android:roundIcon="@mipmap/app_icon".../>

我只是设置android:icon并保持android:roundIcon不变。

相关问题