Could not find common.jar (android.arch.core:common:1.0.0). Searched in the following locations:

xiaoxiao2021-02-28  37

在我解决Could not find com.android.tools.build:gradle:3.0.1这个问题,也就是刚刚写的博客之后,又出现了个Could not find com.android.tools.build:gradle:3.0.1的问题,其实解决方法也很简单,如下:

// Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { google()//添加到这里 jcenter() } dependencies { classpath 'com.android.tools.build:gradle:3.0.1' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { google()//添加到这里 jcenter() } } task clean(type: Delete) { delete rootProject.buildDir }

在中文注释处添加google()即可,但请注意:google()必须在最上方。

转载请注明原文地址: https://www.6miu.com/read-2621219.html

最新回复(0)