嗨我开始在Windows上使用react-native而我构建了我的第一个项目但是当我用
运行时react-native run-andoird
它给了我这个
* What went wrong:
A problem occurred configuring root project 'albums'.
> Could not resolve all files for configuration ':classpath'.
> Could not resolve com.android.tools.build:gradle:3.0.1.
Required by:
project :
> Could not resolve com.android.tools.build:gradle:3.0.1.
> Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.1/gradle-3.0.1.pom'.
> Could not HEAD 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.1/gradle-3.0.1.pom'.
> Connect to jcenter.bintray.com:443 [jcenter.bintray.com/108.168.243.150] failed: Connection timed out: connect
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --
debug option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 22s
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/react-native/docs/android-setup.html
请帮帮我
答案 0 :(得分:0)
如您的用户名和个人资料信息所示,您来自伊朗。在这种情况下,始终始终在您的vpn打开时始终运行react-native。
react-native尝试在运行run-android命令时下载必要的包和工具,但许多存储库返回403代码。这就是你得到错误的原因。