Android 启动器图标在 Android Oreo 中仍显示默认

新手上路,请多包涵

我使用 Android Studio 3.0.1 更改了我的应用程序启动器图标:

 File -> Image Asset

在 Android 8.1 中,图标如下图所示:

在此处输入图像描述

我的 AndroidManifest 详情

 <application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:roundIcon="@mipmap/ic_launcher_round"
    android:hardwareAccelerated="true"
    android:supportsRtl="true"
    android:theme="@style/AppTheme">

我仔细检查了图标。 ic_launcheric_launcher_round 是我的新图标。

原文由 CLIFFORD P Y 发布,翻译遵循 CC BY-SA 4.0 许可协议

阅读 465
2 个回答

我通过改变解决了我的问题

classpath 'com.android.tools.build:gradle:2.3.3'

classpath 'com.android.tools.build:gradle:3.0.1'

在项目中 build-gradle

 dependencies {
        //classpath 'com.android.tools.build:gradle:2.3.3'
        classpath 'com.android.tools.build:gradle:3.0.1'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }

这会导致调味问题,可以通过添加来解决

flavorDimensions “默认”

在应用中 build-gradle

 android {

...
flavorDimensions "default"
defaultConfig {
}

}

这可能会帮助一些有同样问题的人。

原文由 CLIFFORD P Y 发布,翻译遵循 CC BY-SA 3.0 许可协议

最佳解决方案是删除 mipmap-anydpi-v26 文件夹,然后应用程序将采用默认图标。在 android studio Project 模式下转到这个包

res/mipmap-anydpi-v26

删除它并重建并运行程序。

原文由 sasikumar 发布,翻译遵循 CC BY-SA 4.0 许可协议

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题