Cordova: Could not resolve com.android.tools.build:gradle:3.0.0 解决方法 

Igor Android 开源社区评论18,845字数 900阅读3分0秒阅读模式

Corodva Could not resolve com.android.tools.build:gradle:3.0.0 解决方法
使用 cordova run android 运行时,出现错误

* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all files for configuration ':classpath'.
> Could not resolve com.android.tools.build:gradle:3.0.0.
Required by:
project :
> Could not resolve com.android.tools.build:gradle:3.0.0.
> Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.pom'.
> Could not HEAD 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.pom'.
> dl.google.com

搜索了很久,大部门的解决方案都是在repositories中加入google(),实际并没有用。
后来想到可能是网络问题,于是将 android/build.gradle android/app/build.gradle android/CordovaLib/build.gradle中 的所有 repositories改为

repositories {
jcenter()
maven {
url "http://maven.aliyun.com/nexus/content/groups/public/"
}
}

然后就可以了。。。

 

来源: Corodva Could not resolve com.android.tools.build:gradle:3.0.0 解决方法 - 海风的专栏 - CSDN博客

文章末尾固定信息

weinxin
我的微信
我的微信
一个码农、工程狮、集能量和智慧于一身的、DIY高手、小伙伴er很多的、80后奶爸。
 
Igor
  • 本文由 Igor 发表于 2019-02-1723:29:41
Cordova插件:InAppBrowser NodeJS

Cordova插件:InAppBrowser

  一、应用场景   我们在做cordova app开发的时候,可能会经常遇到这种需求。比如在你的app中,你想打开一个URL,但是又不想跳转到系统的浏览器去打开,而是希望直接在app中打开,这个时候...
匿名

发表评论

匿名网友
:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:
确定

拖动滑块以完成验证