0

I am constantly getting this issue. Android Studio is not resolving 11.2.0 latest version of Firebase.

This is my root level gradle,

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

buildscript {

    repositories {
        jcenter{
            url 'http://jcenter.bintray.com'
        }
    }
    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://maven.google.com"
        }
    }
}

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

And app gradle is,

    apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    buildToolsVersion "26.0.1"
    defaultConfig {
        applicationId "com.cognisun.fcmdemo"
        minSdkVersion 23
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {

    compile 'com.android.support:appcompat-v7:26.+'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    compile 'com.android.support:design:26.+'

    compile 'com.google.android.gms:play-services:11.2.0'
    compile 'com.google.firebase:firebase-core:11.2.0'
}
apply plugin: 'com.google.gms.google-services'

I have downloaded every essential sdk files and also followed this link.

Even why I am doing wrong. Any suggestions guys

Jay Vyas
  • 2,674
  • 5
  • 27
  • 58
  • What modules are failing to resolve? – Bob Snyder Aug 23 '17 at 15:21
  • 1
    A related issue--you should not include ALL of the Play Services APIs. [Selectively include only those you need](https://developers.google.com/android/guides/setup) to get better build performance and reduce your APK size. – Bob Snyder Aug 23 '17 at 15:32
  • If I dont use compile 'com.google.android.gms:play-services:11.2.0' even though it fails.. It fail to resolve Firebase apis – Jay Vyas Aug 24 '17 at 04:29

0 Answers0