无法更改应用图标

问题描述 投票:1回答:6

我正在尝试更改已经开发的Android应用程序的启动图标。我右键单击res文件夹。转到新的 - >图像资产并更改其中给出的路径。

它确认我会更新一些文件,等等。但我的发布图标并没有改变。

最重要的是,当我回到res - > new - > image asset时,path已经改回原来的路径:

C:\ Program Files \ Android \ Android Studio1 \ plugins \ android \ lib \ templates \ gradle-projects \ NewAndroidModule \ root \ res \ mipmap-xhdpi \ ic_launcher.png

上述路径甚至不是我项目的一部分。我无法确定,这是硬编码的。请帮忙。

android icons launch android-launcher
6个回答
1
投票

我在我的应用程序中这样做了:

  1. 删除项目中名为ic_launcher.png的每个文件 (主要在android studio下的项目 - > src-> res-> drawable / mipmap中找到...)
  2. 将您自己的Icon png重命名为:ic_launcher.png
  3. 将您的图标拖放到文件夹'mipmap'或'drawable'中,具体取决于您之前在android studio项目中的文件位置。 to the red arrow

完了:)


0
投票

您可以更改图标,只需长按应用程序,此弹出菜单就会显示出来。点按“编辑”。接下来,点击左侧看到的原始图标。您可以从包中选择一个新图标,也可以从图库中的图像中创建一个图标。您可以通过安装自定义启动器来更改图标,


0
投票

转到您的应用AndroidManifest.xml文件,并使用您的图标更改android:icon属性

<application
        android:allowBackup="true"
        android:icon="@drawable/your_icon" 
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity android:name=".MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

0
投票

在Android Studio上,右键单击应用程序的根文件夹>新建>图像资产>启动器图标,然后设置新图标应该可以完成并覆盖现有图标。

如果没有,请先尝试删除项目树中的资产,然后重试。 You have to delete every resolution of it


0
投票

您应该在所有mipmap文件夹中添加新图标,如xxxhdpi,xxhdpi,xhdpi


0
投票

首先在mipmap中添加所有应用程序图标大小,如mdpi,hdpi,xhdpi,xxhdpi和xxxhdpi.After然后只在android:icon属性中放置名称。

<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:roundIcon="@mipmap/ic_launcher_round"
    android:supportsRtl="true"
    android:theme="@style/AppTheme">
</application>
© www.soinside.com 2019 - 2024. All rights reserved.