Pessoal, boa tarde.
Seguindo a aula 3 - Instalando o Firebase da atividade 02 - Recebendo informaçõe s do servidor estou com dificuldades no passo 2 - Add FCM to your app.
Após executado este passo o gradle de nível de projeto tem a linha 'com.google.gms:google-services:4.0.1' adicionada e o gradle de nível de aplicação tem a linha compile 'com.google.firebase:firebase-messaging:17.0.0:15.0.0'.
Após isto, quando o gradle tenta sincronizar de forma automática, ocorre o erro abaixo:
Could not find com.google.gms:google-services:4.0.1. Searched in the following locations: https://dl.google.com/dl/android/maven2/com/google/gms/google-services/4.0.1/google-services-4.0.1.pom https://dl.google.com/dl/android/maven2/com/google/gms/google-services/4.0.1/google-services-4.0.1.jar https://jcenter.bintray.com/com/google/gms/google-services/4.0.1/google-services-4.0.1.pom https://jcenter.bintray.com/com/google/gms/google-services/4.0.1/google-services-4.0.1.jar Required by: project :
Grade da App
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 28
defaultConfig {
applicationId "aluracursoandroid.com.agenda"
minSdkVersion 23
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
packagingOptions {
exclude "META-INF/LICENSE"
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.google.android.gms:play-services-maps:16.0.0'
implementation 'com.google.android.gms:play-services-location:16.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
implementation 'com.squareup.retrofit2:retrofit:2.5.0'
implementation 'com.squareup.retrofit2:converter-jackson:2.5.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.12.0'
implementation 'com.google.firebase:firebase-messaging:17.0.0:15.0.0'
}
Gradle do Projeto
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.google.gms:google-services:4.0.1'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}