- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在运行 ./gradlew assembleRelease
时遇到此错误。我在几个小时内一直在修补。请帮忙。它曾经成功构建,但是在我尝试清除某些内容并结合我的 git 历史记录中的不同文件夹之后,没有什么可以挽救的。
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:mergeReleaseResources'.
> [raw/app] /home/horhi/code/projects/ankilan/android/app/src/main/res/raw/app.json [raw/app] /home/horhi/code/projects/ankilan/android/app/build/generated/res/react/release/raw/app.json: Error: Duplicate resources
[raw/node_modules_reactnativevectoricons_glyphmaps_materialcommunityicons] /home/horhi/code/projects/ankilan/android/app/src/main/res/raw/node_modules_reactnativevectoricons_glyphmaps_materialcommunityicons.json[raw/node_modules_reactnativevectoricons_glyphmaps_materialcommunityicons] /home/horhi/code/projects/ankilan/android/app/build/generated/res/react/release/raw/node_modules_reactnativevectoricons_glyphmaps_materialcommunityicons.json: Error: Duplicate resources
[raw/node_modules_reactnativevectoricons_glyphmaps_fontawesome5free_meta] /home/horhi/code/projects/ankilan/android/app/src/main/res/raw/node_modules_reactnativevectoricons_glyphmaps_fontawesome5free_meta.json[raw/node_modules_reactnativevectoricons_glyphmaps_fontawesome5free_meta] /home/horhi/code/projects/ankilan/android/app/build/generated/res/react/release/raw/node_modules_reactnativevectoricons_glyphmaps_fontawesome5free_meta.json: Error: Duplicate resources
[raw/node_modules_reactnativevectoricons_glyphmaps_fontawesome] /home/horhi/code/projects/ankilan/android/app/src/main/res/raw/node_modules_reactnativevectoricons_glyphmaps_fontawesome.json[raw/node_modules_reactnativevectoricons_glyphmaps_fontawesome] /home/horhi/code/projects/ankilan/android/app/build/generated/res/react/release/raw/node_modules_reactnativevectoricons_glyphmaps_fontawesome.json: Error: Duplicate resources
[raw/node_modules_reactnativevectoricons_glyphmaps_fontisto] /home/horhi/code/projects/ankilan/android/app/src/main/res/raw/node_modules_reactnativevectoricons_glyphmaps_fontisto.json [raw/node_modules_reactnativevectoricons_glyphmaps_fontisto] /home/horhi/code/projects/ankilan/android/app/build/generated/res/react/release/raw/node_modules_reactnativevectoricons_glyphmaps_fontisto.json: Error: Duplicate resources
[raw/node_modules_reactnativevectoricons_glyphmaps_feather] /home/horhi/code/projects/ankilan/android/app/src/main/res/raw/node_modules_reactnativevectoricons_glyphmaps_feather.json[raw/node_modules_reactnativevectoricons_glyphmaps_feather] /home/horhi/code/projects/ankilan/android/app/build/generated/res/react/release/raw/node_modules_reactnativevectoricons_glyphmaps_feather.json: Error: Duplicate resources
[raw/node_modules_reactnativevectoricons_glyphmaps_entypo] /home/horhi/code/projects/ankilan/android/app/src/main/res/raw/node_modules_reactnativevectoricons_glyphmaps_entypo.json [raw/node_modules_reactnativevectoricons_glyphmaps_entypo] /home/horhi/code/projects/ankilan/android/app/build/generated/res/react/release/raw/node_modules_reactnativevectoricons_glyphmaps_entypo.json: Error: Duplicate resources
[raw/node_modules_reactnativevectoricons_glyphmaps_ionicons] /home/horhi/code/projects/ankilan/android/app/src/main/res/raw/node_modules_reactnativevectoricons_glyphmaps_ionicons.json [raw/node_modules_reactnativevectoricons_glyphmaps_ionicons] /home/horhi/code/projects/ankilan/android/app/build/generated/res/react/release/raw/node_modules_reactnativevectoricons_glyphmaps_ionicons.json: Error: Duplicate resources
[raw/node_modules_reactnativevectoricons_glyphmaps_fontawesome5free] /home/horhi/code/projects/ankilan/android/app/src/main/res/raw/node_modules_reactnativevectoricons_glyphmaps_fontawesome5free.json [raw/node_modules_reactnativevectoricons_glyphmaps_fontawesome5free] /home/horhi/code/projects/ankilan/android/app/build/generated/res/react/release/raw/node_modules_reactnativevectoricons_glyphmaps_fontawesome5free.json: Error: Duplicate resources
[raw/node_modules_reactnativevectoricons_glyphmaps_simplelineicons] /home/horhi/code/projects/ankilan/android/app/src/main/res/raw/node_modules_reactnativevectoricons_glyphmaps_simplelineicons.json[raw/node_modules_reactnativevectoricons_glyphmaps_simplelineicons] /home/horhi/code/projects/ankilan/android/app/build/generated/res/react/release/raw/node_modules_reactnativevectoricons_glyphmaps_simplelineicons.json: Error: Duplicate resources
[raw/node_modules_reactnativevectoricons_glyphmaps_evilicons] /home/horhi/code/projects/ankilan/android/app/src/main/res/raw/node_modules_reactnativevectoricons_glyphmaps_evilicons.json [raw/node_modules_reactnativevectoricons_glyphmaps_evilicons] /home/horhi/code/projects/ankilan/android/app/build/generated/res/react/release/raw/node_modules_reactnativevectoricons_glyphmaps_evilicons.json: Error: Duplicate resources
[raw/node_modules_reactnativevectoricons_glyphmaps_materialicons] /home/horhi/code/projects/ankilan/android/app/src/main/res/raw/node_modules_reactnativevectoricons_glyphmaps_materialicons.json [raw/node_modules_reactnativevectoricons_glyphmaps_materialicons] /home/horhi/code/projects/ankilan/android/app/build/generated/res/react/release/raw/node_modules_reactnativevectoricons_glyphmaps_materialicons.json: Error: Duplicate resources
[raw/node_modules_reactnativevectoricons_glyphmaps_antdesign] /home/horhi/code/projects/ankilan/android/app/src/main/res/raw/node_modules_reactnativevectoricons_glyphmaps_antdesign.json [raw/node_modules_reactnativevectoricons_glyphmaps_antdesign] /home/horhi/code/projects/ankilan/android/app/build/generated/res/react/release/raw/node_modules_reactnativevectoricons_glyphmaps_antdesign.json: Error: Duplicate resources
[raw/node_modules_reactnativevectoricons_glyphmaps_foundation] /home/horhi/code/projects/ankilan/android/app/src/main/res/raw/node_modules_reactnativevectoricons_glyphmaps_foundation.json [raw/node_modules_reactnativevectoricons_glyphmaps_foundation] /home/horhi/code/projects/ankilan/android/app/build/generated/res/react/release/raw/node_modules_reactnativevectoricons_glyphmaps_foundation.json: Error: Duplicate resources
[raw/node_modules_reactnativevectoricons_glyphmaps_octicons] /home/horhi/code/projects/ankilan/android/app/src/main/res/raw/node_modules_reactnativevectoricons_glyphmaps_octicons.json [raw/node_modules_reactnativevectoricons_glyphmaps_octicons] /home/horhi/code/projects/ankilan/android/app/build/generated/res/react/release/raw/node_modules_reactnativevectoricons_glyphmaps_octicons.json: Error: Duplicate resources
[raw/node_modules_nativebase_dist_src_basic_icon_nbicons] /home/horhi/code/projects/ankilan/android/app/src/main/res/raw/node_modules_nativebase_dist_src_basic_icon_nbicons.json [raw/node_modules_nativebase_dist_src_basic_icon_nbicons] /home/horhi/code/projects/ankilan/android/app/build/generated/res/react/release/raw/node_modules_nativebase_dist_src_basic_icon_nbicons.json: Error: Duplicate resources
[raw/node_modules_reactnativevectoricons_glyphmaps_zocial] /home/horhi/code/projects/ankilan/android/app/src/main/res/raw/node_modules_reactnativevectoricons_glyphmaps_zocial.json [raw/node_modules_reactnativevectoricons_glyphmaps_zocial] /home/horhi/code/projects/ankilan/android/app/build/generated/res/react/release/raw/node_modules_reactnativevectoricons_glyphmaps_zocial.json: Error: Duplicate resources
* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.5/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 58s
65 actionable tasks: 11 executed, 54 up-to-date
最佳答案
我今天收到了完全相同的错误消息。这些是我为解决错误所做的事情。另外,我添加我之前做过的事情,以防它们相关:
来自这个相关的 Stackoverflow 答案 https://stackoverflow.com/a/55245362
1) 删除/android/app/build/...
2) 删除 /android/build/...
3) 注释掉 apply from "../../node_modules/react-native/react.gradle"
行在 ./android/app/build.gradle
4) 删除/android/app/src/main/assets/index.android.js
5) 通过以下方式从项目的根文件夹重新 bundle :
react-native bundle --platform android --dev false --entry-file index.js --bundle-output
android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res
这里我稍微改变一下OG的答案,你自己决定要使用哪种方式
5) 从 ./android/... 通过
构建 Releasebuild .\gradlew assembleRelease
这对我有用。我之前做过的其他事情,以防它仍然不适合你:
npm install
重新获取依赖项或 yarn install
react-native link react-native-vector-icons
链接 react-native-vector-icons从你的项目根目录希望对你有帮助!
关于android - React native gradlew assembleRelease 构建失败。任务 ':app:mergeReleaseResources' 执行失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61024657/
我是 Gradle 新手,正在阅读此处的 Spring 教程: http://spring.io/guides/gs/gradle/ 我到达了它告诉我添加此任务的部分: task wrapper(ty
我在我的 react-native 项目的 gradlew clear 文件夹中错误地写了 gradlew clean 而不是 android,我发现它做了一些认真的工作。那么这是在做什么, grad
我注意到了 ./gradlew tasks 对于我的 android 项目,给我 assemble* 和 compile* 任务。 有什么区别? 我还注意到该命令列出了任务 compileDemoDe
我正在 salve 机器上设置 Jenkins 作业,我是 Linux shell 的新手。现在我有一个问题: 以 jenkins(为 Jenkins 作业设置的用户帐户)登录,执行 ./gradle
我想在 gradle 的帮助下从命令行构建 apk。我应该使用哪个命令来构建仅发布版本的 apk? 最佳答案 调试 ./gradlew 发布 ./gradlew assembleRelease 你的
我正在尝试 bundle 我的 APK。当我使用 gradlew assembleRelease或 assembleReleaseStaging我的应用程序没有变化。当我使用 react-native
根据 this以及我看过的许多其他地方/论坛,我应该始终在我的 git/svn/cvs 中包含 gradle 包装文件。 但是,为什么?在我的 build.gradle 文件中,我已经明确包含了我希望
我有以下情况: 我有一个包含几个子项目的项目。今天我尝试通过命令行使用 gradle 构建项目。 执行 ./gradlew clean :build 时构建成功, 但不是 ./gradlew clea
一个疯狂的问题,当我运行 gradlew assembleRelease 时,错误信息是: ... Loading dependency graph, done.easeJsAndAssets war
我尝试从命令行运行 gradlew,但经常遇到以下错误。 Brendas-MacBook-Pro:appx_android brendalogy$ ./gradlew compileDebug --s
我有一个来自 Gaelyk(称为 Bloogie)的示例,它使用 gradlew。 我在代理后面。 我阅读了 gradle 文档并发现了这个: gradle.properties systemProp
我有一个gradle项目。 当我输入“gradlew 任务”时,我会看到一堆任务。 这些任务在哪里?我如何查看它们的定义位置? 最佳答案 gradle help --task 将为您提供有关给定任务
我正在使用 Minecraft Forge 进行 retrofit 。对于那些不知道 Forge 是什么的人来说,它是一个防止模组破坏 Minecraft 源代码并帮助模组共存的程序。它还包含一个开发
我已经设置了 build.gradle文件与 apply plugin: 'java' .我尝试使用说明设置 gradle 包装器 here ,但是当我输入 sudo ./gradlew build
我从 git 加载一个项目并在 MacBook 上成功构建它。当我在终端窗口中输入 './gradlew assembleRelease' 时,出现错误: bash: ./gradlew: No su
我运行./gradlew clean是因为我的flutter运行assembleDebug过程花费了意想不到的长时间。我希望它删除我的文件夹,但相反,它开始下载gradle。Downloading h
当我尝试使用 ./gradlew clean 清理我的项目时它有效,但是./gradlew build不会工作。我尝试了一些存储库,但它无法解决 Spring 依赖项。 这里是 build.gradl
我正在尝试构建libGDX项目,但是gradlew刚刚停止工作。两个月前,它运行良好。似乎更新Java破坏了它。这是发生了什么: 这是Java文件夹的内容(不知道为什么会有用): 最佳答案 您的JAV
我正面临这个问题 sparsh610@DESKTOP-551C51M:/mnt/e/xxxxxxxxx$ ./gradlew mm : not found2: ./gradlew: : not fou
我已经设置了 build.gradle 文件,目前我的项目运行良好。现在的问题是当我运行 ./gradlew run 时,它失败并显示错误: What went wrong: Execution fa
我是一名优秀的程序员,十分优秀!