Android Studio - Could not find intellij-core.jar

后端 未结 12 965
小蘑菇
小蘑菇 2020-12-03 00:40

I am using android studio 3.1.4.

Error:Could not find intellij-core.jar (com.android.tools.external.com-intellij:intellij-core:26.0.1). Searched in the following loc

12条回答
  •  日久生厌
    2020-12-03 01:12

    If you're using classpath 'com.android.tools.build:gradle:3.0.1' or higher in your project/build.gradle, the solution is:

    Add "google()" to your project/build.gradle file in 2 places:

    // Top-level build file where you can add configuration options common to all sub-projects/modules.
    buildscript {
        repositories {
            google()
            jcenter()
            maven {
                url 'https://maven.google.com/'
                name 'Google'
            }
        }
        dependencies {
            ...
        }
    }
    
    allprojects {
        repositories {
            google()
            jcenter()
            maven {
                url 'https://maven.google.com/'
                name 'Google'
            }
        }
    }
    

    Then you will see in the logs that intellij-core.jar is downloaded from different URLs:

    • https://dl.google.com/dl/android/maven2/com/android/tools/external/com-intellij/intellij-core/26.0.1/intellij-core-26.0.1.pom
    • https://dl.google.com/dl/android/maven2/com/android/tools/external/com-intellij/intellij-core/26.0.1/intellij-core-26.0.1.jar

提交回复
热议问题