加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

搭建react native所遇到的坑

发布时间:2020-12-15 20:23:10 所属栏目:百科 来源:网络整理
导读:一、所遇问题 在搭建react native环境中,遇到执行react native? run-android命令出现如下问题 1 Could not resolve all dependencies for configuration ‘ :classpath ‘ . 2 Could not resolve com.github.dcendents:android-maven-gradle-plugin: 3.1 . 4

一、所遇问题

在搭建react native环境中,遇到执行react native? run-android命令出现如下问题

1  Could not resolve all dependencies for configuration :classpath.
2    > Could not resolve com.github.dcendents:android-maven-gradle-plugin:3.1.4
3      Required by:
4          project :
5       > Could not resolve com.github.dcendents:android-maven-gradle-plugin:3.1.4
6          > Could not get resource https://jcenter.bintray.com/com/github/dcendents/android-maven-gradle-plugin/1.3/android-maven-gradle-plugin-1.3.pom.
7             > Could not GET https://jcenter.bintray.com/com/github/dcendents/android-maven-gradle-plugin/1.3/android-maven-gradle-plugin-1.3.pom.
8                > Connect to 127.0.0.1:80 [/127.0.0.1] failed: Connection refused: connect

报错原因是:是因为gradle配置文件启动了代理,导致无法访问。把gradle.properties文件里代理的配置语句注释掉即可(即下面第二张图红框的内容)

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读