Gradle error when adding firebase

com google firebase firebase-core
firebase android tutorial
how to add firebase to android studio
firebase-client dependency
firebase-analytics library
firebase-storage implementation
firebase sdk
com google firebase firebase notifications

I have a problem in gradle when I am adding firebase or google ads:

.

Also you can check the code from gradle below. What am I missing?

android {
    compileSdkVersion 27
    defaultConfig {
        applicationId "com.jnugzar"
        minSdkVersion 15
        targetSdkVersion 27
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')


    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.android.support.constraint:constraint-layout:1.1.2'
    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.google.firebase:firebase-core:16.0.1'
    implementation 'com.google.firebase:firebase-ads:15.0.1'



}

Add implementation 'com.google.firebase:firebase-core:16.0.0' in Module Gradle and In Root gradle make sure you have setup properly

buildscript {

     repositories {
        google()
        jcenter()
      }
    dependencies {
      classpath 'com.android.tools.build:gradle:3.1.2'


     // NOTE: Do not place your application dependencies here; they belong
     // in the individual module build.gradle files
      classpath 'com.google.gms:google-services:4.0.1'
    }
 }

Add Firebase to your Android project - Firebase, Option 2: Use the Android Studio Firebase Assistant (requires additional configuration). Option 1: Add Firebase using the Firebase console. Adding Firebase to  Join GitHub today. GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.

Just update your firebase to the latest version (update firebase-ads) and add firebase-core, for version you can check this link:

implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.firebase:firebase-ads:15.0.1'

And make sure you are using these:

classpath 'com.android.tools.build:gradle:3.1.3'
classpath 'com.google.gms:google-services:4.0.1'

Try this:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 27
    defaultConfig {
        applicationId "com.jnugzar"
        minSdkVersion 15
        targetSdkVersion 27
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')


    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.android.support:customtabs:27.1.1'
    implementation 'com.android.support:design:27.1.1'
    implementation 'com.android.support:animated-vector-drawable:27.1.1'
    implementation 'com.android.support:support-media-compat:27.1.1'

    implementation 'com.android.support.constraint:constraint-layout:1.1.2'
    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.google.firebase:firebase-core:16.0.1'
    implementation 'com.google.firebase:firebase-ads:15.0.1'

}

And:

// 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.1.3'
        classpath 'com.google.gms:google-services:4.0.1'
    }
}

allprojects {
    repositories {
        google()
        jcenter()
    }
}

[cloud_firestore,firebase_auth] Gradle error on adding firebase to , Add plugins with versions dated May 7, 2019 and onwards. Run the app on physical android device. (no error in flutter web). Expected behavior when adding the firebase_messaging: ^5.1.2 my app doesn't build, after removing it, the app builds with no problems, I tried to migrate to androidX but this didn't help, also tries to use m

my gradle sync gets error when adding the firebase to project and i have solved my problem with adding this lines to gradle.properties :

android.useAndroidX=true
android.enableJetifier=true

and adding firebase.core to my module gradle dependencies

FirebaseUI for Android, In your app/build.gradle file add a dependency on one of the FirebaseUI libraries. If you encounter a version incompatibility error between Android Studio and  To add Firebase SDKs to your app using a Firebase BoM: For Gradle 5.0 and later, BoM support is automatically enabled. Set up your dependencies in your module Gradle file (usually app/build.gradle):

The Google Services Gradle Plugin, Introduction; Adding the JSON File; Processing the JSON File; Troubleshooting APIs or Firebase services in your Android application you may have to add Q: When building I get the following error message: "File google-services.json is  I'm having the same problem as @byshy, adding fIrebase_messaging ^5.1.2 broke my app's build process, and ending up with a single line saying 'Finished with error: Gradle task assembleDebug failed with exit code 1'. Currently using this firebase plugin version in pubspec.yaml

Adding Firebase to Android App, Adding Firebase to Android App. There are various sevices offered online such as storage, online processing, realtime database, authorisation of user etc. Dismiss Join GitHub today. GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.

Gradle Error adding firebase dependencies for dynamic link, In my build.gradle , I've tried to add implementation 'com.google.firebase:firebase​-dynamic-links:16.0.0' , but then I've gotten this error: ERROR:  I am using Firebase Auth.I am working in unity 2018.I have dowloaded Quickstart-unity-Master.In that i am working Auth Section. I have download the latest googlservices.json file also. But when i try to build the Firebase auth in android.

Comments
  • please help me..
  • Did you read the link shown in your IDE?
  • i dont now, im just started android studio )
  • At the bottom of your screenshot there is a link that tells you what's wrong.
  • @NugoJaparidze had similar problem too, update your ads library and add firebase core too, check my answer
  • I try but same problem
  • i update grandle but same problem (implementation 'com.android.support:appcompat-v7:27.1.1' )
  • same problem with implementation 'com.android.support:appcompat-v7:27.1.1'
  • @NugoJaparidze update your question and post code not image so we can help you
  • @NugoJaparidze is this fix your problem?
  • yes .thank you very much friend. im traing to create quiz apps for education ))