jitpack无法解析库

时间:2018-10-23 17:34:53

标签: android gradle

一切正常,我几乎创建了项目的一半,并由于jitpack突然遇到了gradle错误。当我在gradle文件中添加url“ https://maven.google.com”时,它解决了库问题,但materialsearch bar出现了错误。这是我的gradle文件

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.3.3'
        classpath 'com.google.gms:google-services:3.1.0'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
                maven{
                    url "https://jitpack.io"
                }

    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

错误 无法解决编译'com.android.support:appcompat-v7:26。+'

1 个答案:

答案 0 :(得分:0)

尝试将您的依赖项更新为    classpath 'com.android.tools.build:gradle:3.2.1' classpath 'com.google.gms:google-services:4.0.1'

和所有项目存储库

   allprojects {
    repositories {
        google()
        jcenter()
        maven { url 'https://jitpack.io' }
        maven { url "https://maven.google.com" }
    }
}

如果您仍然有错误,请编辑问题并添加错误