Android Studio出现Could not find intellij-core.jar错误的解决方案

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/walkeryudev/article/details/84033806

今天看到微信群里有人从网上下载了一个项目,结果导入的时候出现了这个错误,然后一群人在讨论是不是google被墙的原因。我去年也遇到过这个问题,因为是个小问题,所以也就没有记下来,现在记下来吧,如果你也遇到了这个问题,希望可以帮到你
导入项目之后,直接提示
Error:Could not find intellij-core.jar (com.android.tools.external.com-intellij:intellij-core:26.0.1). Searched in the following locations: https://jcenter.bintray.com/com/android/tools/external/com-intellij/intellij-core/26.0.1/intellij-core-26.0.1.jar

解决方案是:
1、如果你的项目gradle文件里没有依赖maven ,需要添加maven依赖

repositories {
    jcenter()
    maven {
        url "https://maven.google.com"
    }
}

2、有些朋友会说,我已经依赖了maven了,可是还报这个错怎么办?
这时候可以调换一下依赖库的顺序

epositories {
    maven {
        url "https://maven.google.com"
    }
    jcenter()
}

再重新编译一下,问题是不是已经解决啦~~

猜你喜欢

转载自blog.csdn.net/walkeryudev/article/details/84033806