0

The full error is:

Could not find com.google.android.gms:play-services-auth:15.1.0. Searched in the following locations: file:/C:/Users/Alex/AppData/Local/Android/sdk/extras/m2repository/com/google/android/gms/play-services-auth/15.1.0/play-services-auth-15.1.0.pom file:/C:/Users/Alex/AppData/Local/Android/sdk/extras/m2repository/com/google/android/gms/play-services-auth/15.1.0/play-services-auth-15.1.0.jar file:/C:/Users/Alex/AppData/Local/Android/sdk/extras/google/m2repository/com/google/android/gms/play-services-auth/15.1.0/play-services-auth-15.1.0.pom file:/C:/Users/Alex/AppData/Local/Android/sdk/extras/google/m2repository/com/google/android/gms/play-services-auth/15.1.0/play-services-auth-15.1.0.jar file:/C:/Users/Alex/AppData/Local/Android/sdk/extras/android/m2repository/com/google/android/gms/play-services-auth/15.1.0/play-services-auth-15.1.0.pom file:/C:/Users/Alex/AppData/Local/Android/sdk/extras/android/m2repository/com/google/android/gms/play-services-auth/15.1.0/play-services-auth-15.1.0.jar https://jcenter.bintray.com/com/google/android/gms/play-services-auth/15.1.0/play-services-auth-15.1.0.pom https://jcenter.bintray.com/com/google/android/gms/play-services-auth/15.1.0/play-services-auth-15.1.0.jar https://dl.google.com/dl/android/maven2/com/google/android/gms/play-services-auth/15.1.0/play-services-auth-15.1.0.pom https://dl.google.com/dl/android/maven2/com/google/android/gms/play-services-auth/15.1.0/play-services-auth-15.1.0.jar https://maven.google.com/com/google/android/gms/play-services-auth/15.1.0/play-services-auth-15.1.0.pom https://maven.google.com/com/google/android/gms/play-services-auth/15.1.0/play-services-auth-15.1.0.jar Required by: project :app

build.gradle(Module: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(Project)

// 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
}
Sagar
  • 23,903
  • 4
  • 62
  • 62
Alex B
  • 3
  • 4

2 Answers2

0

I don't think there is 15.1.0 out. You should use 15.0.1 com.google.android.gms:play-services-auth:15.0.1

There's new versioning of services: https://android-developers.googleblog.com/2018/05/announcing-new-sdk-versioning.html Basically you can't assume the same version number for different services.

bojan
  • 870
  • 9
  • 7
  • I changed: implementation 'com.google.android.gms:play-services-auth:15.0.1' implementation 'com.google.firebase:firebase-messaging:15.0.2' and get this error Manifest merger failed : Attribute meta-data#android.support.VERSION@value value=(26.0.1) from [com.android.support:design:26.0.1] AndroidManifest.xml:28:13-35 is also present at [com.android.support:support-v4:26.1.0] AndroidManifest.xml:28:13-35 value=(26.1.0). Suggestion: add 'tools:replace="android:value"' to element at AndroidManifest.xml:26:9-28:38 to override. – Alex B May 21 '18 at 21:24
  • you could try this one: https://stackoverflow.com/questions/45553058/android-manifest-merger-failed-gms-play-services-firebase , also could you accept my answer as it fixes your initial question. thanks – bojan May 22 '18 at 00:20
  • The information in the above link of stackoverflow unfortunatly did't resolved the problem. This simple thing resolved it: compileSdkVersion 27 and targetSdkVersion 27 – Alex B May 22 '18 at 21:51
  • Does compileSdkVersion 27 and targetSdkVersion 27 work with com.google.android.gms:play-services-auth:15.1.0? Or it works with 15.0.1 suggested by me? – bojan May 22 '18 at 23:06
  • 15.0.1 as you have suggested – Alex B May 23 '18 at 23:47
  • cool, so please mark my answer as valid, as 1. it answers your initial question, 2. might help others realizing that google abandoned old style of versioning (I had similar error as yours couple of days earlier) 3. it would be nice of you. thanks! – bojan May 24 '18 at 00:17
  • Tell me if it is OK? V is green now – Alex B May 25 '18 at 15:35
0

You will need to update the version of the latter dependency to 15.0.2. This addresses the issue where version 3.3.0 of the Google Services Gradle plugin reports.

or switch to old version -

in build.gradle

implementation 'com.google.firebase:firebase-auth:11.0.4'

and in project - build.gradle

classpath 'com.google.gms:google-services:3.2.1' // google-services plugin
Asteroid
  • 718
  • 7
  • 21
  • I changed: implementation 'com.google.android.gms:play-services-auth:15.0.1' implementation 'com.google.firebase:firebase-messaging:15.0.2' and get this error Manifest merger failed : Attribute meta-data#android.support.VERSION@value value=(26.0.1) from [com.android.support:design:26.0.1] AndroidManifest.xml:28:13-35 is also present at [com.android.support:support-v4:26.1.0] AndroidManifest.xml:28:13-35 value=(26.1.0). Suggestion: add 'tools:replace="android:value"' to element at AndroidManifest.xml:26:9-28:38 to override. – Alex B May 21 '18 at 21:27