我有一个正在工作的应用程序查找,但我注意到图标没有改变。因此,我开始改变它,现在无论我做什么,我都不能让它创建一个apk或包。下面是我所犯的错误。
我正在使用Android最新版本下载
这不是有决议的重复。所有建议的问题,以及我寻找的问题,都没有一个有效的解决方案。(如果我错过了解决这个问题的方法,那么我很抱歉)
我所做的:除了3天无休止的搜索在这里和谷歌,我增加了一个新的图像资产通过“文件”,"mipmap",和“应用”。我还删除了mipmap中的所有文件,然后再试一次。我还查看了一个新项目的清单,并在其中复制和粘贴了应用程序材料(包括我自己的东西)。
请注意:i不是在编辑发布清单.这只是为了向您显示错误显示的内容而添加的。
首先,日志中的主要错误:
Android资源链接失败的W:\Live6\app\build\intermediates\packaged_manifests\release\AndroidManifest.xml:13:错误:资源mipmap/ic(又名com.live.plive:mipmap/ic)未找到。W:\Live6\app\build\intermediates\packaged_manifests\release\AndroidManifest.xml:13:错误:资源mipmap/ic_(又名com.live.plive:mipmap/ic_)未找到。错误:处理清单失败。
现在发布清单中的错误
<application
android:allowBackup="true"
android:appComponentFactory="androidx.core.app.CoreComponentFactory"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.pLive" >在我的主舱单上是一样的
注意:我的mipmap中也有ic_launcher、ic_launcher_foreground和ic_launcher_round
这是我的主要清单:
<application
tools:replace="android:icon"
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/Theme.pLive"
tools:targetApi="s">
```发布于 2022-10-27 18:18:38
如果有人在找答案。我通过3次添加图像资产来解决这个问题。您必须将其作为一种正常的方式(发布),然后再次作为"Main“,并将其添加到可绘制的"Debug”中。一旦你有了这三个,通过mipmap并点击其中的每一个。未使用的将删除。您仍然可以在几个XML文件中看到android默认设置,但是当您制作包或测试APK时,它将显示您创建的自定义图标。我希望这有助于解决这个问题的人。
https://stackoverflow.com/questions/74199990
复制相似问题