请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

启动项目报错

老师我启动自己的项目是正常的,但是我克隆了一份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那么说我没有配置好开发环境,但是我自己的项目是可以启动的,请问这个是什么原因报的错,应该怎么解决? 谢谢

正在回答 回答被采纳积分+3

1回答

CrazyCodeBoy 2022-07-01 08:56:21
你用yarn install安装下依赖之后在运行下看看呢
0 回复 有任何疑惑可以回复我~
  • 提问者 慕丝1117639 #1
    还是不行,依旧报错:
    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-reanimated\E:\FrontEndLearn\NativePro\react-native-reanimated\Example\android\app\node_modules\react-native\package.json (�ļ�����Ŀ¼��������﷨����ȷ��)
    回复 有任何疑惑可以回复我~ 2022-07-01 14:56:41
问题已解决,确定采纳
还有疑问,暂不采纳
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号