课程案例启动报错
来源:1-2 课程导学
慕瓜5307192
2018-12-27
搭建的环境正常,跑github_advanced 报错内容如下:
A problem occurred configuring project ‘:react-native-webview’.
Could not resolve all files for configuration ‘:react-native-webview:classpath’.
Could not resolve com.android.tools.build:gradle:3.2.1.
Required by:
project :react-native-webview
Could not resolve com.android.tools.build:gradle:3.2.1.
Could not get resource ‘https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.2.1/gradle-3.2.1.pom’.
Could not GET ‘https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.2.1/gradle-3.2.1.pom’.
Connect to dl.google.com:443 [dl.google.com/127.0.1.2] failed: Connection refused: connect
Could not resolve com.android.tools.build:gradle:3.2.1.
Could not get resource ‘https://jcenter.bintray.com/com/android/tools/build/gradle/3.2.1/gradle-3.2.1.pom’.
Could not GET ‘https://jcenter.bintray.com/com/android/tools/build/gradle/3.2.1/gradle-3.2.1.pom’.
Connect to jcenter.bintray.com:443 [jcenter.bintray.com/127.0.1.3] failed: Connection refused: connect
Could not resolve com.android.tools.build:gradle:3.2.1.
Could not get resource ‘https://maven.fabric.io/public/com/android/tools/build/gradle/3.2.1/gradle-3.2.1.pom’.
Could not GET ‘https://maven.fabric.io/public/com/android/tools/build/gradle/3.2.1/gradle-3.2.1.pom’.
Connect to maven.fabric.io:443 [maven.fabric.io/127.0.1.4] failed: Connection refused: connect
Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.71.
1回答
-
CrazyCodeBoy
2018-12-27
相关的依赖库没有下载下来所致:
在项目根目录运行 npm install 或yarn install;
然后check node_modules中是否有react-native-webview被安装进来;
用AndroidStudio打开项目中的android目录,然后clean&build项目之后试一下;
另外,在仓库的doc目录下有个代码运行指南可以参考下哈。
012018-12-28
相似问题