reactnativecn / react-native-website

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

下载React Navigation 后 重启报错 #578

Closed ming-js closed 2 years ago

ming-js commented 2 years ago

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.2/userguide/command_line_interface.html#sec:command_line_warnings

FAILURE: Build failed with an exception.

BUILD FAILED in 7s

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 7s

at makeError (E:\react native\test2\node_modules\execa\index.js:174:9)
at E:\react native\test2\node_modules\execa\index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async runOnAllDevices (E:\react native\test2\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
at async Command.handleAction (E:\react native\test2\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.

没有环境,什么鬼

npx react-native info

System: OS: Windows 10 10.0.22000 CPU: (8) x64 Intel(R) Core(TM) i5-8300H CPU @ 2.30GHz Memory: 2.31 GB / 7.87 GB Binaries: Node: 16.13.1 - E:\node\node.EXE Yarn: 1.22.18 - E:\node\node_global\yarn.CMD npm: 8.5.1 - E:\node\npm.CMD Watchman: Not Found SDKs: Android SDK: Not Found Windows SDK: Not Found IDEs: Android Studio: Not Found Visual Studio: Not Found Languages: Java: 11.0.14 - C:\Program Files\Common Files\Oracle\Java\javapath\javac.EXE npmPackages: @react-native-community/cli: Not Found react: 17.0.2 => 17.0.2 react-native: 0.67.4 => 0.67.4 react-native-windows: Not Found npmGlobalPackages: react-native: Not Found

adb devices

List of devices attached a1cf97277d28 device

echo

C:\Users\12196\AppData\Local\Android\Sdk

通过上面的三个指令确定环境是没有问题的,头大!!!