java - 创建签名的 bundle 版本。错误 : Android resource linking failed

标签 java android bundle release

我是java android的初学者。

在 Android Studio 中发布 Java 项目“Create signed bundle”时出现如下错误(当我选择 debug 时它们是正常构建的):

我在谷歌搜索引擎和 stackoverflow 上搜索了一个解决方案。 所提供的答案均未帮助解决此问题。

Android resource linking failed
C:\Users\user\AndroidStudioProjects\Door\app\build\intermediates\packaged_manifests\release\AndroidManifest.xml:22: error: resource mipmap/ic_launcher (aka com.example.door:mipmap/ic_launcher) not found.
C:\Users\user\AndroidStudioProjects\Door\app\build\intermediates\packaged_manifests\release\AndroidManifest.xml:22: error: resource mipmap/ic_launcher_round (aka com.example.door:mipmap/ic_launcher_round) not found.
error: failed processing manifest.

安卓 list .xml

...
<application
    android:allowBackup="true"
    <!--When I delete these two lines, the build ends successfully.-->
    android:icon="@mipmap/ic_launcher"
    android:roundIcon="@mipmap/ic_launcher_round"
    android:label="@string/app_name"
    android:requestLegacyExternalStorage="true"
    android:supportsRtl="true"
    android:theme="@style/Theme.Door">
 ...

enter image description here

提前致谢。

最佳答案

我刚刚找到了一个解决方案......

转到你的项目文件夹,你会看到这样的..

enter image description here

注意您将只有调试文件夹。所以创建一个名为 release 的新文件夹并复制 debug 文件夹中的所有内容并生成 apk 现在它可以工作了

谢谢

关于java - 创建签名的 bundle 版本。错误 : Android resource linking failed,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73268365/

相关文章:

java - 找到用于旋转给定实体的增量角度,其位置、初始旋转和目标点为 'face toward'

java - public void - Button.setEnabled 与 if 语句适合我的情况吗?

java - gluUnProject 的使用

ruby - 是否有公共(public) ruby​​gems.org 镜像?

java - 将参数字符串分隔成 double java

Java Random(seed) 在索引处随机获取?

java - Android 异步任务无法完成

android - 如何根据对象的另一个值获取特定的 JSON 对象?

css - bundle 不会仅在一台服务器上解压

angular - 相当于 NPM 的 bower_concat