请稍等 ...
×

采纳答案成功!

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

课程案例启动报错

搭建的环境正常,跑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.

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

1回答

CrazyCodeBoy 2018-12-27 23:37:06

相关的依赖库没有下载下来所致:

  • 在项目根目录运行 npm install 或yarn install;

  • 然后check  node_modules中是否有react-native-webview被安装进来;

  • 用AndroidStudio打开项目中的android目录,然后clean&build项目之后试一下;

另外,在仓库的doc目录下有个代码运行指南可以参考下哈。

0 回复 有任何疑惑可以回复我~
  • 提问者 慕瓜5307192 #1
    用AndroidStudio打开项目中的android目录,然后clean&build项目之后,还是报一样的错误,其他依赖都能成功下载,就缺“react-native-webview“
    回复 有任何疑惑可以回复我~ 2018-12-28 14:56:01
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信