Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yarn react-native run-android 报error #895

Open
WhutZml opened this issue Oct 25, 2024 · 1 comment
Open

yarn react-native run-android 报error #895

WhutZml opened this issue Oct 25, 2024 · 1 comment

Comments

@WhutZml
Copy link

WhutZml commented Oct 25, 2024

请按以下格式提供问题的相关信息。

问题的具体描述

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.
屏幕截图 2024-10-26 002509

请描述完整的环境/版本信息

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

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"
}
}

预期结果

  • 请描述你觉得代码正常运行的情况应该是什么样子。
  • 如果问题比较模糊,没有具体方案,那么请具体描述你想要实现什么功能。
@xiangjiu0918
Copy link

请问解决了吗?我也遇到了这个问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants