Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android build error com.google.firebase:firebase-core:17.0.0

I have to problem when build. i add build firebase core 16.0.0, but when build, this is build firebase core 17.0.0. why it build 17.0.0.I check android https://firebase.google.com/docs/android/setup#available_libraries, now version 16.0.0, i have to remove build project, but this is not success. Can you help me? Thanks.

when i increase version build

  classpath 'com.google.gms:google-services:4.0.1' // google-services plugin

and

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.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'

    //them multiDexEnabled = true
    implementation 'com.android.support:multidex:1.0.3'
    implementation 'com.android.support:recyclerview-v7:27.1.1'
    implementation 'com.android.support:design:27.1.1'

    // butter knife.
    implementation 'com.jakewharton:butterknife:8.8.1'
    annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'

    // gson.
    implementation 'com.google.code.gson:gson:2.8.2'

    // image loading.
    implementation 'com.github.bumptech.glide:glide:4.7.1'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.7.1'
    implementation "com.github.bumptech.glide:okhttp3-integration:4.7.1"
    implementation 'com.github.bumptech.glide:annotations:4.7.1'

    //com.squareup.retrofit2
    implementation 'com.squareup.retrofit2:retrofit:2.4.0'
    implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
    implementation 'com.squareup.retrofit2:adapter-rxjava2:2.4.0'

    //com.squareup.okhttp3
    implementation 'com.squareup.okhttp3:logging-interceptor:3.10.0'
    implementation 'com.squareup.okhttp3:okhttp:3.10.0'

    //io.reactivex.rxjava2
    implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'
    implementation 'io.reactivex.rxjava2:rxjava:2.1.13'

    // keyboard keyboardvisibilityevent
    implementation 'net.yslibrary.keyboardvisibilityevent:keyboardvisibilityevent:2.1.0'

    // Cloud Messaging
    implementation 'com.google.firebase:firebase-messaging:17.0.0'

    //Analytics
    implementation 'com.google.firebase:firebase-core:16.0.0'

    //Invites and Dynamic Links
    implementation 'com.google.firebase:firebase-invites:16.0.0'

    //AdMob
    implementation 'com.google.firebase:firebase-ads:16.0.0'

    implementation 'com.firebaseui:firebase-ui-database:3.1.1' // No trouble in compiling
    implementation 'com.google.firebase:firebase-auth:16.0.1'

    // ViewModel and LiveData
    implementation 'android.arch.lifecycle:extensions:1.1.1'

    //room Save data in a local database using Room
    implementation 'android.arch.persistence.room:runtime:1.1.0'
    annotationProcessor "android.arch.persistence.room:compiler:1.1.0"

    //push OneSignal
    implementation 'com.onesignal:OneSignal:3.8.3'

    //gmc
    implementation 'com.google.android.gms:play-services-gcm:15.0.1'

    //palette
    implementation 'com.android.support:palette-v7:27.1.1'

    //loading
    implementation 'com.wang.avi:library:2.1.3'

    //crop image
    implementation 'com.isseiaoki:simplecropview:1.1.7'

    //exoplayer-textureview
    implementation 'com.google.android.exoplayer:exoplayer:2.7.3'
    implementation 'com.google.android.exoplayer:extension-ima:2.7.3'

    //facebook .
    implementation 'com.facebook.android:facebook-android-sdk:4.29.0'

    //facebook ads
    implementation 'com.facebook.android:audience-network-sdk:4.28.1'

    //no name :)
    implementation 'com.android.support:support-v4:27.1.1'
    implementation 'com.android.support:customtabs:27.1.1'
}
like image 923
QuestionAndroid Avatar asked May 28 '18 02:05

QuestionAndroid


People also ask

How do I get rid of Firebase app?

Sign in to Firebase, then open your project. , then select Project settings. In the Your apps card, select the app that you want to delete.

Does Firebase use Ad_id?

I did some research and and I found that Firebase is not using the AD_ID at all.

How do I know if an app is connected to Firebase Android?

If you want to know if the client is connected to the server before calling setValue() , you can attach a listener to . info/connected .

What is Android Firebase?

The Assistant tool window in Android Studio. Firebase is a mobile platform that helps you quickly develop high-quality apps, grow your user base, and earn more money. Firebase is made up of complementary features that you can mix-and-match to fit your needs, with Google Analytics for Firebase at the core.


1 Answers

First, add build.gradle file, to include the google-services plugin and the Google's Maven repository:

buildscript {
// ...
dependencies {
    // ...
    classpath 'com.google.gms:google-services:4.0.1' // google-services 
plugin
}
}

 allprojects {
// ...
repositories {
    // ...
    maven {
        url "https://maven.google.com" // Google's Maven repository
    }
}
 }

add the apply plugin line at the bottom of the file to enable the Gradle plugin:

apply plugin: 'com.android.application'

android {
 // ...
 }

 dependencies {
  // ...
 implementation 'com.google.firebase:firebase-core:16.0.0'

  // Getting a "Could not find" error? Make sure you have
  // added the Google maven respository to your root build.gradle
  }

  // ADD THIS AT THE BOTTOM
  apply plugin: 'com.google.gms.google-services'

You should also add the dependencies for the Firebase SDKs you want to use. We recommend starting with com.google.firebase:firebase-core

like image 146
Android Geek Avatar answered Sep 30 '22 19:09

Android Geek