我在我的应用程序中更改了启动器图标。我添加的图片是PNG格式的。但是当我清理并构建我的项目时,出现以下错误。
找不到与给定名称匹配的资源(在值为“@mipmap/ic_launcher.png”的“图标”处)。
下面是我的AndroidManifest.xml
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
最佳答案
从 android:icon
中删除文件的扩展名
改变自
android:icon="@mipmap/ic_launcher.png"
到
android:icon="@mipmap/ic_launcher"
请确保您在 mipmap
文件夹中有 ic_launcher.png
编辑:
从您发布的屏幕截图看来,您正在编辑错误的 list 文件。请务必编辑 src/main/manifests
关于android - 找不到与给定名称匹配的资源(在 'icon' 处,值为 '@mipmap/ic_launcher.png' ),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31583749/