问题描述
问题出现的环境背景及自己尝试过哪些方法
在运行 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...
这种问题比较难找。 有可能是那个包过时了没有及时跟新。 尝试用其他包代替看看