启动项目报错
来源:2-3 开发环境搭建指导-Windows平台【持续更新】
慕丝1117639
2022-06-30
老师我启动自己的项目是正常的,但是我克隆了一份react-native-reanimated仓库的样例,之后发现无法启动他这个项目,报错如下:
Build file 'E:\FrontEndLearn\NativePro\react-native-reanimated\android\build.gradle' line: 105
* What went wrong:
A problem occurred evaluating project ':react-native-reanimated'.
> E:\FrontEndLearn\NativePro\react-native\package.json (ϵͳ�Ҳ���ָ����·����)
* 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 5s
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.
* Where:
Build file 'E:\FrontEndLearn\NativePro\react-native-reanimated\android\build.gradle' line: 105
* What went wrong:
A problem occurred evaluating project ':react-native-reanimated'.
> E:\FrontEndLearn\NativePro\react-native\package.json (ϵͳ�Ҳ���ָ����·����)
* 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 5s
at makeError (E:\FrontEndLearn\NativePro\react-native-reanimated\Example\node_modules\@react-native-community\cli-platform-android\node_modules\execa\index.js:174:9)
at E:\FrontEndLearn\NativePro\react-native-reanimated\Example\node_modules\@react-native-community\cli-platform-android\node_modules\execa\index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async runOnAllDevices (E:\FrontEndLearn\NativePro\react-native-reanimated\Example\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
at async Command.handleAction (E:\FrontEndLearn\NativePro\react-native-reanimated\Example\node_modules\@react-native-community\cli\build\index.js:192:9)
info Run CLI with --verbose flag for more details.
我的RN版本是0.68.2,error那么说我没有配置好开发环境,但是我自己的项目是可以启动的,请问这个是什么原因报的错,应该怎么解决? 谢谢
写回答
1回答
-
CrazyCodeBoy
2022-07-01
你用yarn install安装下依赖之后在运行下看看呢012022-07-01
相似问题