当前位置: 首页 > 知识库问答 >
问题:

Android同步失败-找不到com.google.Android.gms:play-services-auth:15.1.0

麹飞航
2023-03-14

完整的错误是:

build.gradle(模块:app)

    apply plugin: 'com.android.application'

  android {
compileSdkVersion 25
buildToolsVersion '27.0.3'
defaultConfig {
    applicationId "alex.ness.edu.xmlandfirebaseandloginto"
    minSdkVersion 16
    targetSdkVersion 25
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    multiDexEnabled true
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}

   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'
})
implementation 'com.android.support:appcompat-v7:25.4.0'
implementation 'com.android.support:design:25.4.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.android.support:support-v4:25.4.0'
implementation 'com.android.support:recyclerview-v7:25.4.0'
implementation 'org.jsoup:jsoup:1.10.3'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.android.support:cardview-v7:25.4.0'
implementation 'com.google.firebase:firebase-auth:15.1.0'
implementation 'com.google.android.gms:play-services-auth:15.1.0'
implementation 'com.google.firebase:firebase-messaging:15.1.0'
testCompile 'junit:junit:4.12'
implementation 'com.beardedhen:androidbootstrap:2.3.1'
implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
implementation 'com.firebaseui:firebase-ui-auth:2.3.0'
}

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

Build.Gradle(项目)

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

    buildscript {
        repositories {
            jcenter()
            maven { url 'https://maven.fabric.io/public' }
            google()
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:3.1.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.3.0'
        }
    }

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

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

共有1个答案

颛孙喜
2023-03-14

我不认为有15.1.0。您应该使用15.0.1 com.google.android.gms:play-services-auth:15.0.1

有新的服务版本:https://android-developers.googleblog.com/2018/05/innection-new-sdk-versioning.html基本上,您不能为不同的服务假设相同的版本号。

 类似资料:
  • 无法同步分级。 错误:找不到com.android.tools.build:gradle:1.0.0。在以下位置搜索:文件:/e:/installed/androidsdk/gradle/m2repository/com/android/tools/build/gradle/1.0.0/gradle-1.0.0.pom文件:/e:/installed/androidsdk/gradle/m2rep

  • Kotlin:1.3.41 Groovy:2.5.4 Ant:Apache Ant(TM)版本1.9.14编译于2019年3月12日JVM:1.8.0_60(Oracle Corporation 25.60-B23)OS:Windows 10 10.0 amd64 C:\users\Michael> 由于以下原因,无法发布整个日志:您需要至少10个信誉才能发布超过8个链接。

  • 所以,我遇到了一个奇怪的问题。我想将gradle从升级到,但它不允许。 以下是我得到的错误: 我在看一些旧的帖子,他们都详细说明了它的要求和项目,但奇怪的是,上面是空白的。 下面是我的文件的样子: 我还在中检查了gradle路径,并将其设置为根目录。 日志也没有帮助,它说的和上面一样: 我做错了什么? 编辑:

  • 我从GitHub下面的链接下载了basicSample项目。当我想同步项目,我得到以下错误。我搜索了一下,我看到了这个链接(如何在android studio中将梯度更新到3.4.1),我尝试了脱机模式,但又不起作用。我当时很困惑。我不能在线同步gradle 3.4.0吗?是否应该使用脱机同步?如果是,我如何设置gradle和gradle插件(我在设置中设置了gradle的路径,但Android

  • 我尝试在Android Studio中导入一个项目。导入时,Gradle出现了一个错误: 我试过: