Android Studio cannot find my google play services

I followed the step-by-step instructions and went through the questions hour by hour and none of the things I tried led me to an answer. Where should I look next?

Mistake

Error:Could not find com.google.gms:google-services:1.3.0-beta1.
Searched in the following locations:
    file:/Applications/Android Studio.app/Contents/gradle/m2repository/com/google/gms/google-services/1.3.0-beta1/google-services-1.3.0-beta1.pom
    file:/Applications/Android Studio.app/Contents/gradle/m2repository/com/google/gms/google-services/1.3.0-beta1/google-services-1.3.0-beta1.jar
    https://maven.fabric.io/public/com/google/gms/google-services/1.3.0-beta1/google-services-1.3.0-beta1.pom
    https://maven.fabric.io/public/com/google/gms/google-services/1.3.0-beta1/google-services-1.3.0-beta1.jar
Required by:
    MyApp:myApp:unspecified

      

MyApp Gradle

buildscript {
    repositories {
        maven { url 'https://maven.fabric.io/public' }
    }

    dependencies {
        classpath 'io.fabric.tools:gradle:1.+'
        classpath 'com.google.gms:google-services:1.3.0-beta1'
    }
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'com.google.gms.google-services'

repositories {
    maven { url 'https://maven.fabric.io/public' }
}


android {
    compileSdkVersion 21
    buildToolsVersion "22.0.1"

    defaultConfig {
        applicationId "android.phone.MyApp"
        minSdkVersion 13
        targetSdkVersion 21
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
}

dependencies {
    compile project(':comcrashlyticssdkandroid_crashlytics_2')
    compile 'com.android.support:support-v4:+' // updated
    compile 'com.google.android.gms:play-services-analytics:+' // updated
    compile 'com.google.android.gms:play-services-gcm:+' // updated
    compile "com.google.android.gms:play-services:+"
}

      

Additional SDK features

enter image description here

+3


source to share


2 answers


jcenter()

contains android libraries, you need to add them to your repositories.



buildscript {
    repositories {
        jcenter();
        maven { url 'https://maven.fabric.io/public' }
    }

    dependencies {
        classpath 'io.fabric.tools:gradle:1.+'
        classpath 'com.google.gms:google-services:1.3.0-beta1'
    }
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'com.google.gms.google-services'

repositories {
    jcenter();
    maven { url 'https://maven.fabric.io/public' }
}

      

+15


source


//Add the dependency to your project top-level build.gradle:
classpath 'com.google.gms:google-services:1.3.0-beta1'

//Add the plugin to your app-level build.gradle:
apply plugin: 'com.google.gms.google-services'

//Set Up Google Play Services
dependencies {
  compile "com.google.android.gms:play-services:7.5.+"
}

      



0


source







All Articles