BUILD FAILED in 52s
error Failed to install the app. Command failed with exit code 1: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081 FAILURE:
Build failed with an exception. Where: Settings file 'D:\Android\GitPro\cloud_edge\node_modules\@react-native\gradle-plugin\settings
.gradle.kts' line: 16 What went wrong: Plugin [id: 'org.gradle.toolchains.foojay-resolver-convention', version: '0.5.0'] was not foun
d in any of the following sources: - Gradle Core Plugins (plugin is not in 'org.gradle' namespace) - Included Builds (No included build
s contain this plugin) - Plugin Repositories (could not resolve plugin artifact 'org.gradle.toolchains.foojay-resolver-convention:org.g
radle.toolchains.foojay-resolver-convention.gradle.plugin:0.5.0') Searched in the following repositories: MavenRepo Google Gradle Centr
al Plugin Repository * 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 52s.
info Run CLI with --verbose flag for more details.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
请描述完整的环境/版本信息
System:
OS: Windows 11 10.0.22631
CPU: (20) x64 12th Gen Intel(R) Core(TM) i7-12700H
Memory: 3.42 GB / 15.81 GB
Binaries:
Node:
version: 20.17.0
path: D:\NodeJs\node.EXE
Yarn:
version: 1.22.22
path: ~\AppData\Roaming\npm\yarn.CMD
npm:
version: 10.8.2
path: D:\NodeJs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK: Not Found
Windows SDK: Not Found
IDEs:
Android Studio: Not Found
Visual Studio:
17.7.34031.279 (Visual Studio Community 2022)
Languages:
Java: 17.0.8
Ruby: Not Found
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.74.5
wanted: 0.74.5
react-native-windows: Not Found
npmGlobalPackages:
"react-native": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: Not found
newArchEnabled: Not found
请按以下格式提供问题的相关信息。
问题的具体描述
BUILD FAILED in 52s error Failed to install the app. Command failed with exit code 1: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081 FAILURE: Build failed with an exception. Where: Settings file 'D:\Android\GitPro\cloud_edge\node_modules\@react-native\gradle-plugin\settings .gradle.kts' line: 16 What went wrong: Plugin [id: 'org.gradle.toolchains.foojay-resolver-convention', version: '0.5.0'] was not foun d in any of the following sources: - Gradle Core Plugins (plugin is not in 'org.gradle' namespace) - Included Builds (No included build s contain this plugin) - Plugin Repositories (could not resolve plugin artifact 'org.gradle.toolchains.foojay-resolver-convention:org.g radle.toolchains.foojay-resolver-convention.gradle.plugin:0.5.0') Searched in the following repositories: MavenRepo Google Gradle Centr al Plugin Repository * 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 52s. info Run CLI with --verbose flag for more details. error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
请描述完整的环境/版本信息
System: OS: Windows 11 10.0.22631 CPU: (20) x64 12th Gen Intel(R) Core(TM) i7-12700H Memory: 3.42 GB / 15.81 GB Binaries: Node: version: 20.17.0 path: D:\NodeJs\node.EXE Yarn: version: 1.22.22 path: ~\AppData\Roaming\npm\yarn.CMD npm: version: 10.8.2 path: D:\NodeJs\npm.CMD Watchman: Not Found SDKs: Android SDK: Not Found Windows SDK: Not Found IDEs: Android Studio: Not Found Visual Studio:
package.json
{ "name": "frontend", "version": "0.0.1", "private": true, "scripts": { "android": "react-native run-android", "ios": "react-native run-ios", "lint": "eslint .", "start": "react-native start", "test": "jest" }, "dependencies": { "react": "18.2.0", "react-native": "0.74.5" }, "devDependencies": { "@babel/core": "^7.20.0", "@babel/preset-env": "^7.20.0", "@babel/runtime": "^7.20.0", "@react-native/babel-preset": "0.74.87", "@react-native/eslint-config": "0.74.87", "@react-native/metro-config": "0.74.87", "@react-native/typescript-config": "0.74.87", "@types/react": "^18.2.6", "@types/react-test-renderer": "^18.0.0", "babel-jest": "^29.6.3", "eslint": "^8.19.0", "jest": "^29.6.3", "prettier": "2.8.8", "react-test-renderer": "18.2.0", "typescript": "5.0.4" }, "engines": { "node": ">=18" } }
预期结果