相关疑难解决方法(0)

无法解析com.google.android.gms play-services-auth:11.4.0

我想在Android项目中为Android FirebaseUI - Auth编写代码,但是从最近两天开始,我在当前代码中遇到错误,不知道如何修复它.努力但却没有以正确的方式发生.

这是我的build.gradle(项目:FriendlyChat)

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
        mavenLocal()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.2.2'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
        classpath 'com.google.gms:google-services:3.0.0'
    }
}

allprojects {
    repositories {
        jcenter()
        mavenLocal()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
Run Code Online (Sandbox Code Playgroud)

这是我的build.gradle(模块:app)

apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'

repositories {
    mavenLocal()
    flatDir {
        dirs …
Run Code Online (Sandbox Code Playgroud)

java android android-support-library google-play-services android-gradle-plugin

38
推荐指数
6
解决办法
8万
查看次数

没有缓存可用于版本"com.google.android.gms:play-services:11.8.0"

在我的Android应用程序中使用谷歌地图活动时,我收到此错误.

"无法解析com.google.android.gms:play-services:11.8.0."

项目级 Gradle文件:

buildscript {

repositories {
    jcenter()
    google()
}
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 {
        jcenter()
        google()
    }
}
task clean(type: Delete) {
    delete rootProject.buildDir
}
Run Code Online (Sandbox Code Playgroud)

应用程序级 Gradle文件:

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    testCompile 'junit:junit:4.12'
    //noinspection GradleCompatible
    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.google.android.gms:play-services:11.8.0'
}
Run Code Online (Sandbox Code Playgroud)

android google-maps google-play-services build.gradle android-gradle-plugin

0
推荐指数
1
解决办法
3963
查看次数