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

按照官方文档搭建开发环境,编译应用的时候一直报错 #838

Open
YiwenOne opened this issue May 23, 2024 · 8 comments
Open

Comments

@YiwenOne
Copy link

问题的具体描述

BUILD FAILED in 2s
error Failed to install the app. Command failed with exit code 1: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081 FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring root project 'AwesomeProject'. > Could not determine the dependencies of null. > Could not resolve all dependencies for configuration ':classpath'. > The new Java toolchain feature cannot be used at the project level in combination with source and/or target compatibility * 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 2s.
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.

@sunnylqm
Copy link

jdk版本不对

@wh-hujinyun
Copy link

请问最后解决了吗?

@hdjhdjhdj
Copy link

最后怎么解决了啊

@Jidahan
Copy link

Jidahan commented Jul 26, 2024

我也是一样的问题

@sunnylqm
Copy link

JDK版本不对,就对着文档弄成文档需要的JDK版本

@Jidahan
Copy link

Jidahan commented Jul 26, 2024

我也是一样的问题

目前已经解决,使用android studio打开项目,等他自己安装,爆红后点击控制台左边得刷新按钮【reload gradle project】失败了再多点几次,然后就好了

@Jidahan
Copy link

Jidahan commented Jul 26, 2024

我也是一样的问题

目前已经解决,使用android studio打开项目,等他自己安装,爆红后点击控制台左边得刷新按钮【reload gradle project】失败了再多点几次,然后就好了

微信截图_20240726144013

@hdjhdjhdj
Copy link

我也是一样的问题

目前已经解决,使用android studio打开项目,等他自己安装,爆红后点击控制台左边得刷新按钮【reload gradle project】失败了再多点几次,然后就好了

微信截图_20240726144013

感谢,我解决了。
原来我用官方文档,直接cmd命令npx react-native run-android打开,可能代理不稳定,容易超时,导致出错
直接用android studio打开项目,这边超时可以重新再安装,会好一点,多重试几次。我装了2个多小时才装好

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

5 participants