gpt4 book ai didi

android - 任务 ':app:processReleaseGoogleServices' 执行失败。无法删除 : . ..../values.xml

转载 作者:行者123 更新时间:2023-11-29 00:58:56 26 4
gpt4 key购买 nike

我有一个 React Native 项目。我正在为 macOS 构建 android 版本(我对 iOS 没有任何问题)。我一直在关注本指南:https://facebook.github.io/react-native/docs/signed-apk-android .当我运行 ./gradlew assembleRelease 时,出现以下错误:

:app:processReleaseGoogleServices
Parsing json file: /Users/robavery/repositories/ourdailystrength_app/android/app/google-services.json
:app:processReleaseGoogleServices FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processReleaseGoogleServices'.
> Failed to delete: /Users/robavery/repositories/ourdailystrength_app/android/app/build/generated/res/google-services/release/values/values.xml

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 47s

我已经清理并在尝试清理我的项目时遇到相同的错误(无论我是通过 Android Studio、./gradlew clean 还是 npm run clean:android )。

我尝试运行 sudo ./gradlew assembleRelease,但随后出现此错误:

> Task :app:processReleaseGoogleServices
Parsing json file: /Users/robavery/repositories/ourdailystrength_app/android/app/google-services.json


FAILURE: Build failed with an exception.

* What went wrong:
Failed to capture snapshot of input files for task ':app:bundleReleaseJsAndAssets' property '$1' during up-to-date check.
> Failed to create MD5 hash for file '/Users/robavery/repositories/ourdailystrength_app/.buckd/sock' as it does not exist.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 16s

不过,我宁愿能够以用户身份而不是 sudo 身份运行它。

是什么导致了这个错误?我如何解决这个问题并在不使用 sudo 的情况下成功地进行 gradle 构建以进行发布?

最佳答案

如果问题是权限,这不是 super 安全,但应该可以工作

sudo chmod -R 777 /Users/robavery/repositories/ourdailystrength_app

只需使用 chmod 将 persions 修改为 777 这是所有组的别名,所有权限,-R 标志递归运行它所以你点击了目录中的每个文件。

如果这不起作用,那么可以尝试 clearing your project cache

关于android - 任务 ':app:processReleaseGoogleServices' 执行失败。无法删除 : . ..../values.xml,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52507828/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com