react-native run-android 报错,求助大佬!!!

新手上路,请多包涵

问题描述

clipboard.png

问题出现的环境背景及自己尝试过哪些方法

在运行 react-native run-android的时候遇到这个问题,

我尝试过执行react-native upgrade去更新项目,没效果,也删除过node_modules重新下载,也没效果,关于报错的react-native-version-number,我试过重新install并执行了react-native link,最后也没效果,网上找到类似的报错都是sdk和证书的,求助各位了

相关代码

// 请把代码文本粘贴到下方(请勿用图片代替代码)

  • Where:

Build file '/Users/demoup_nak/Documents/nuo_app 4/DoctorApp/node_modules/react-native-version-number/android/build.gradle' line: 27

  • What went wrong:

A problem occurred evaluating project ':react-native-version-number'.

Could not find method implementation() for arguments [com.facebook.react:react-native:+] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
  • Try:

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 1.24 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/re...

你期待的结果是什么?实际看到的错误信息又是什么?

阅读 2k
1 个回答

这种问题比较难找。 有可能是那个包过时了没有及时跟新。 尝试用其他包代替看看

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题