Failed to Resolve: 'com.android.support:appcom

2019-01-27 10:43发布

I know, it looks like a duplicate, but none of the other solutions out there work. I just switched from Android Studio to IntelliJ IDEA (So I don't need 3,000 different IDE's), and after setting it up, I created a new project just to test everything was good. The Gradle build starts off okay but then it throws the error:

Error:(26, 13) Failed to resolve: com.android.support:appcompat-v7:27.0.3

This is a fresh, stock, not edited build.gradle file.

annoying message

In the messages, it gives me the option to Install Repository and sync project, and thats where my problem begins. No matter what version the AppCompat library is, IntelliJ just keeps slapping this error in my face.

Any tips?

2条回答
Luminary・发光体
2楼-- · 2019-01-27 10:49

That's because there is no 27.0.3 for that library. You probably want 27.1.0, or perhaps 27.0.2.

You can see the list of versions for the different artifact groups and artifacts at https://maven.google.com.

查看更多
Evening l夕情丶
3楼-- · 2019-01-27 11:03

This was the my error when i tried to change my targe SDK version 23 to SDK version 26 Could not resolve all dependencies for configuration ':app:_debugApkCopy'.

Could not find com.android.support:appcompat-v7:27.1.0. Searched in the following locations:

resolved @android/build.gradle :

allprojects {
    repositories {
        mavenLocal()
        jcenter()
        maven {
            url "$rootDir/../node_modules/react-native/android"
        }
        maven {
            url "https://maven.google.com"
        }
    }
}

@app/build.gradle file:

android {
    compileSdkVersion 27
    buildToolsVersion "27.0.1"

    defaultConfig {
        applicationId "WWWWWWWWWW"
        minSdkVersion 16
        targetSdkVersion 27

      ......

  //under dependicies
compile "com.android.support:appcompat-v7:27.1.0"

at least i solved that error that way, yes still another errors i need to solve

查看更多
登录 后发表回答