1
I’m trying to use the Firebase of Android Studio but I made the settings as in Google site itself, and the message that appears to me is:
Gradle 'MeuProjeto' project refresh failed Error:A problem occurred configuring root project 'Meu Projeto'.
I ask for someone’s help, below my Gradle code.
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
// Add this line
classpath 'com.google.gms:google-services:3.0.0'
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
// Add to the bottom of the file
apply plugin: 'com.google.gms.google-services'
Other Gradle Archive
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "24.0.0"
defaultConfig {
applicationId "bbac.cursoandroidstudio"
minSdkVersion 19
targetSdkVersion 24
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 fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:24.0.0'
compile 'com.android.support:design:24.0.0'
testCompile 'junit:junit:4.12'
compile 'com.google.firebase:firebase-messaging:9.6.1'
}
Also enter the code of the other Gradle file.
– Pablo Almeida
Ready friend :)
– Felipe Edwards Vanstocher