Android 解决Could not find com.android.tools.build:gradle
16lz
2021-01-23
异常
Error:Could not find com.android.tools.build:gradle:2.2.2.Searched in the following locations: https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.2.2/gradle-2.2.2.pom https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.2.2/gradle-2.2.2.jarRequired by: :ListViewAnimations-master:unspecified
解决方法
在项目的根目录的build.gradle文件中的buildscript->repositories节点下添加jcenter(),然后更新依赖。
buildscript { repositories { jcenter() mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:2.2.2' }}allprojects { repositories { jcenter() mavenCentral() }}
更多相关文章
- Android之USB Camera摄像头节点后移
- Android清单文件详解(六) ---- 节点的属性
- android 获取sd卡根目录
- android通过USB的MTP模式下,禁止用户在根目录有任何操作(重命名 删
- android 获取外置sd卡根目录
- Android 上层应用读写底层设备节点(Android M)
- Android 框架之创建设备节点文件
- 遍历android根目录的简单资源查看器
- Android TimeLine 时间节点轴的实现