reactnativecn / react-native-website

React Native 中文网
https://reactnative.cn
MIT License
218 stars 328 forks source link

请问新创建的项目报错A problem occurred evaluating project ':app'.如何解决,坐等大佬。 #568

Closed tian1711873821 closed 2 years ago

tian1711873821 commented 2 years ago

FAILURE: Build failed with an exception.

BUILD FAILED in 3s

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081

FAILURE: Build failed with an exception.

BUILD FAILED in 3s

at makeError (D:\native\AwesomeProject\node_modules\execa\index.js:174:9)
at D:\native\AwesomeProject\node_modules\execa\index.js:278:16
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async runOnAllDevices (D:\native\AwesomeProject\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
at async Command.handleAction (D:\native\AwesomeProject\node_modules\@react-native-community\cli\build\index.js:192:9)

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.

项目使用android studio打开android文件可以正常运行,但是yarn react-native run-android却报错是为什么呢

sunnylqm commented 2 years ago

android studio带的jdk版本(我猜是jdk11) 和你自己装的jdk版本(我猜低于jdk11)不一致

github-actions[bot] commented 2 years ago

👋 Hey there, it looks like there has been no activity on this issue in the last 90 days. Has the issue been fixed, or does it still require the community attention? This issue will be closed in the next 7 days if no further activity occurs. Thank you for your contributions.

github-actions[bot] commented 2 years ago

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.