Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

311
Visualizações
Error when connecting Firebase to Android Studio

I am trying to learn how to create an Android application with Android Studio. My project is currently blank, the only page is MainActivity.java. I created a project in Firebase and put the name (com.example.connect), and I added the JSON file to the App location, but when I click connect, I get the following error:

(Could not parse the Android Application Module's Gradle config. Resolve gradle build issues and/or resync)

How can I fix it?

Build Gradle

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()

    }
}
rootProject.name = "RUVOLT"
include ':app'

Build Gradle Module

plugins {
    id 'com.android.application'
    id 'com.google.firebase.crashlytics'
}

android {
    compileSdk 32

    defaultConfig {
        applicationId "com.example.ruvolt"
        minSdk 19
        targetSdk 32
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

apply plugin: 'com.google.gms.google-services'
dependencies {
    implementation 'com.google.firebase:firebase-analytics:20.0.2'
    implementation platform('com.google.firebase:firebase-bom:29.0.3')
    implementation 'com.google.firebase:firebase-analytics'
    implementation 'androidx.appcompat:appcompat:1.4.0'
    implementation 'com.google.android.material:material:1.4.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.2'
    implementation 'com.google.firebase:firebase-crashlytics:18.2.6'
    androidTestImplementation 'androidx.test.ext:junit:1.1.3'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}
about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

In your build.gradle, apply these plugins and libraries for adding firebase:

apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'


implementation platform('com.google.firebase:firebase-bom:26.0.0')
implementation 'com.google.firebase:firebase-analytics'
implementation 'com.google.firebase:firebase-messaging:23.0.0'
implementation 'com.google.firebase:firebase-crashlytics'
implementation 'com.google.firebase:firebase-analytics'

In your class path file, please verify that you entered these lines properly inside the dependencies tag:

classpath 'com.google.gms:google-services:4.3.10'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.8.1'

Also, make sure you have added the JSON file of Google under the app section of the project file. For proper reference, go to the documentation.

about 4 years ago · Juan Pablo Isaza Relatório

0

  1. Add the Google service plugin:

     plugins {
         id 'com.android.application'
         id 'com.google.gms.google-services'
         id 'com.onesignal.androidsdk.onesignal-gradle-plugin'
     }
    
  2. Also check the build.gradle project for the Google service dependency

    classpath 'com.google.gms:google-services:4.3.10'
    
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda