reactnativecn / react-native-website

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

windows11 RN 初始化项目后下载第三方库后报错 #576

Closed ming-js closed 2 years ago

ming-js commented 2 years ago

通过 react-native init 初始化项目后再下载 第三方库 例如 react-native-elements出现如下情况:

node

1648538104(1)

真机上

8498d467cff83853ef558e3609884fb

之后按照 node 上面的提示操作: 提示1与4不是内部或外部命令,也不是可运行的程序或批处理文件; -- 没有这个命令 提示2与3, 没有效果

没办法只有去安装 react-native-safe-area-context, 安装完成后出现以下报错: 1648540163(1)

环境是没什么问题呀???

这个是环境配置 H_J

sunnylqm commented 2 years ago

目录名中不要带空格这种骚操作

ming-js commented 2 years ago

但是我把文件名改成了驼峰命名,并且重新初始化一个项目,然后下载 react Navigation 按照教程修改运行报错信息没变化 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 8s

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

at makeError (E:\reactRative\test\node_modules\execa\index.js:174:9)
at E:\reactRative\test\node_modules\execa\index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async runOnAllDevices (E:\reactRative\test\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
at async Command.handleAction (E:\reactRative\test\node_modules\@react-native-community\cli\build\index.js:192:9)
sunnylqm commented 2 years ago

Could not get resource 就是标准的翻墙问题(如果你有代理,那就是你的代理对命令行没有生效,需要额外配置)