I'm trying out Android Studio 3.0 Canary 9 with an existing project, and I'm getting this error trying to sync the build files:
Error:Failed to resolve: commons-logging:commons-logging:1.1.1
I am not adding commons-logging as a dependency, so it must be used by some other dependency but I don't know what. Here's the buildscript section of my top-level build file where I made changes for 3.0:
buildscript {
repositories {
jcenter {
url "http://jcenter.bintray.com/"
}
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0-alpha9'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
classpath 'de.felixschulze.gradle:gradle-hockeyapp-plugin:3.5'
}
}
In gradle-wrapper.properties I have this:
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-rc-1-all.zip
The only change I made in the project build file was to the way I was renaming the APK file. Anybody know how to track down this dependency and what to do to fix it?
If you using Android Gradle 2.2 plugin or newer, then you should remove com.neenbedankt.gradle.plugins:android-apt from your Gradle plugins.
Also change all apt in dependencies to annotationProcessor
You can read more here
I don't know if this will fix, but it might help in locating the issue.
start a new empty project using AS 3.0, add the 3 dependencies 1 by 1 while testing in between each add. I have a suspicion one of them doesn't play nicely with AS 3.0, and that it has nothing to do with your code since you made no changes.
Another thing you can try is going back to an older version of AS and rechecking that it runs. This isolates the issue to AS 3.0 and not your code or dependencies.
Lastly if nothing works, create a brand new project with new package name and manually copy paste everything into the new project. I usually find lots of bugs doing this.
I followed moonpire00's suggestion and created a new project. I discovered that the problem was with the AWS imports:
implementation 'com.amazonaws:aws-android-sdk-core:2.2.0'
implementation 'com.amazonaws:aws-android-sdk-ses:2.2.0'
I changed them to this:
implementation 'com.amazonaws:aws-android-sdk-core:2.2.0', {
exclude module: 'commons-logging'
}
implementation 'com.amazonaws:aws-android-sdk-ses:2.2.0', {
exclude module: 'commons-logging'
}
And now the gradle sync works! If anyone has insight into why this error would appear with Android Studio / gradle 3.0, please post a comment.
Its Working
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
defaultConfig {
applicationId "com.keshav.mraverification"
minSdkVersion 15
targetSdkVersion 26
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:26.0.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:cardview-v7:26.0.1'
compile 'com.android.support:design:26.0.1'
testCompile 'junit:junit:4.12'
}
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
}
Related
I'm using Android Studio version 2.3.3. It has been updated recently. Whenever I try to add a new dependency for any use e.g. recyclerview, cardview, retrofit, etc, the gradle fails to resolve them.
I have mentioned the repositories in gradle file. But there is no solution.
this is my gradle file
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.3"
defaultConfig {
applicationId "com.example.apurva.bargraph"
minSdkVersion 15
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
}
allprojects {
repositories {
jcenter()
maven { url "https://jitpack.io" }
maven {url "https://maven.google.com"}
}
}
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:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.github.philjay:mpandroidchart:v3.0.2'
testCompile 'junit:junit:4.12'
}
for each of the dependency, gradle sync fails and I don't know what else to do.
Any kind of help would be great.
There may be number of problems for this
1. First check your buildToolVersion which you are using is installed in your sdk.
2. You have to add below code in project gradle file not in app gradle.
maven { url "https://jitpack.io" }
maven {url "https://maven.google.com"}
Just change the buildToolVersion to higher version which is installed in you studio.
It's May be help you out.
This is because you didn't have support library 25.3.1 installed in your system. So, you need to install the sdk from Android Studio via Tools->Android->SDK Manager for support library below 25.4.0. You only need to use google maven to use support library starting from revision 25.4.0.
I updated my android studio and my gradle will not sync
issues it gives me these errors. Im also using firebase as for authorization and database.I have tried deleting the gradle files and rebuilding but that didnt work. any suggestions would be appreciated.
Failed to resolve .com.android.support:support-v4:25.2.0
Failed to resolve com.android.support.test.espresso:espresso-core:2.2.2
Failed to resolve com.android.support:appcompat-v4:25.3.1
Failed to resolve com.android.support:mediarouter-V7:25.2.0
here is the build gradle for the project
// 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.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.google.gms:google-services:3.0.0'
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
here is my app gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion '25.0.3'
defaultConfig {
applicationId "com.example.dude.sportspicks518"
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(include: ['*.jar'], dir: 'libs')
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
}
compile 'com.android.support:appcompat-v4:25.3.1'
compile 'com.google.firebase:firebase-auth:10.0.1'
compile 'com.google.firebase:firebase-database:10.0.1'
testCompile 'junit:junit:4.12'
compile 'com.google.android.gms:play-services:10.2.6'
}
apply plugin: 'com.google.gms.google-services'
several way to try
Invalidate Cache/Restart AS
Clean Project and Rebuild
Update "Google Repository" and "Android Support repository" in the Android SDK Manager.
if not working, then If you are trying to get the support repository, this is the correct import:
compile "com.android.support:support-v4:25.3.1"
If your compile api isn't 25, change the version to the latest with your compile api.
Android Studio should give you a yellow warning if you are using incompatible version. just hover it and use the suggestion given
P/s: Please please dont use com.google.android.gms:play-services.. it very heavy dex method count
Gradle Project Refresh Failed
After I added KenBurnsView Library to build.gradle on app level. When I try to sync the gradle it failed.
build.gradle (app level)
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.0"
defaultConfig {
applicationId "com.sample.ac"
minSdkVersion 16
targetSdkVersion 24
versionCode 1
versionName "1.0_dev"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
jackOptions {
enabled true
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
repositories {
jcenter()
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
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:25.0.1'
compile 'com.android.support:design:25.0.1'
compile 'com.android.support:recyclerview-v7:25.0.1'
compile 'com.android.support:cardview-v7:25.0.1'
//ButterKnife for view injector
compile 'com.jakewharton:butterknife:8.4.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.4.0'
// EventBus for passing data between activities and fragments
compile 'org.greenrobot:eventbus:3.0.0'
//Material Loading Circular Progress Bar with white background
compile 'com.lsjwzh:materialloadingprogressbar:0.5.8-RELEASE'
//GSON for parsing JSON into Java Object and vice versa
compile 'com.google.code.gson:gson:2.6.2'
//For Image Loading from network
compile 'com.github.bumptech.glide:glide:3.7.0'
//SLiding up Panel Layout for Music Player
compile 'com.sothree.slidinguppanel:library:3.3.0'
//For Network Calling
compile 'com.mcxiaoke.volley:library:1.0.19'
//ViewPagerIndicator
compile 'com.romandanylyk:pageindicatorview:0.0.7'
//Google Play Services
compile 'com.google.android.gms:play-services-auth:10.0.0'
compile 'com.google.android.gms:play-services-plus:10.0.0'
compile 'com.google.android.gms:play-services-identity:10.0.0'
compile 'com.google.android.gms:play-services-base:10.0.0'
compile 'com.google.android.gms:play-services-location:10.0.0'
compile 'com.google.android.gms:play-services-maps:10.0.0'
compile 'com.google.android.gms:play-services-gcm:10.0.0'
//Ken Burns Effect for Image Background
compile 'com.flaviofaria:kenburnsview:1.0.7'
//Material Search View
// compile 'com.miguelcatalan:materialsearchview:1.4.0'
compile project(':searchlibrary')
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
build.gradle (project level)
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.2'
classpath 'com.google.gms:google-services:3.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
mavenCentral()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
I got it when trying to add a dependency to "com.android.support.constraint:constraint-layout:1.0.0-beta4" for an android training class.
I managed to get past it and it did involve Jack, as #Scott suspected.
Got past it by:
commenting out the added dependency, the jackOptions enable true block, and the compileOptions block, where I had it compatible with 1.8.
Sync/Clean/Rebuild Gradle (whichever it is, I'm still learning)
Uncomment the added dependency, sync/rebuild gradle again
Uncomment the jackOptions and compileOptions blocks, sync/rebuild gradle again
At that point, it worked for me.
Add it to app build.gradle or project build.module:
repositories {
maven {
url 'https://maven.google.com'
}
}
I get this problem when I add 'constraint-layout' dependency and I find out answer in ofical manual: https://developer.android.com/training/constraint-layout/index.html
I think it will help you!
After hours of trying everything, this worked for me -> Upgrade com.google.gms:google-services to latest version.
Case : added
dataBinding {
enabled = true
}
Solution : In project gradle classpath changed
'com.google.gms:google-services:3.3.1'
to
'com.google.gms:google-services:4.0.1' (latest version)
I upgraded gradle and a google-play-services lib and didn't realize that you are apparently required to remove apply plugin: 'com.google.gms.google-services' at the end of app module's build.gradle.
Removing it solved this for me.
The docs were a little misleading. Removing apply plugin: 'com.google.gms.google-services' did indeed solve this problem, but the line is still required for Firebase to work actually.
After some more playing around, I noticed that also removing the dataBinding{enabled true} made the error go away. But again, also this is not a solution.
In the end I had to downgrade to com.android.tools.build:gradle:3.0.0 - which again is obviously not a solution because you are missing out on e.g. InstantRun, but at least it builds.
The whole issue was introduced after an update to Android Studio 3.1.2, so I assume that downgrading again would solve it.
I come across this question too , i added maven in repositories{...} and a dependency in dependencies {...} of module's build.gradle .
I find the reason , because Android Studio can't load the dependency from maven repository . then instead compile, i copy the jar to module , sync ,the error is disappeared.
In summary , you can check out the dependency is loaded or not at "C:\Users\wjj.gradle\caches\modules-2\files-2.1".
I hope it can help you!
Im having a problems when trying to implement gcm. When I try to sync gradle files this error appears:
Warning:Gradle version 2.8 is required. Current version is 2.4. If using the gradle wrapper, try editing the distributionUrl in D:\MyProjects\Android\Enjoy\gradle\wrapper\gradle-wrapper.properties to gradle-2.8-all.zip
Tried to go to wrapper and change it to 2.8, but its still not working.
Here is my app build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "enjoy.enjoyprague_restaurants_bars"
minSdkVersion 17
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
dexOptions {
javaMaxHeapSize "4g"
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
// android libraries activity, design
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.android.support:cardview-v7:23.1.1'
compile 'com.android.support:recyclerview-v7:23.1.1'
// application
compile 'com.android.support:multidex:1.0.1'
// volley for handlers
compile 'com.mcxiaoke.volley:library:1.0.19'
compile 'com.google.code.gson:gson:2.4'
// picasso
compile 'com.squareup.picasso:picasso:2.5.2'
// simple xml
compile('org.simpleframework:simple-xml:2.7.1') {
exclude group: 'stax', module: 'stax-api'
exclude group: 'xpp3', module: 'xpp3'
}
// floating action menu
compile 'com.oguzdev:CircularFloatingActionMenu:1.0.2'
// Google Map api
compile 'com.google.android.gms:play-services:8.4.0'
compile 'com.google.android.gms:play-services-gcm:8.4.0'
compile 'com.google.maps.android:android-maps-utils:0.4'
}
//google gcm sender
apply plugin: 'com.google.gms.google-services'
and top level build gradle:
// 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.0.0-alpha3'
classpath 'com.google.gms:google-services:2.0.0-alpha3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
maven { url "http://dl.bintray.com/populov/maven" }
mavenCentral()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Open gradle folder in your project directory, and change gradle wrapper properties file. (you can find that last line indicating the path to gradle used in build). You may find it incorrect (e.g. http\://) fix it to (http://)
Ok, so, Android Studio is very buggy. Now, what you need to do is go to this question and do exactly as they said there. Take it to offline and that stuff. It will work, guaranteed.
https://stackoverflow.com/a/21996772/4458300
Use Graddle Wrapper
1)
Check distributionUrl and see if it is specified as gradle-2.8.zip at the Gradle-wrapper properties file within the Android project.
Project/gradle/wrapper/gradle-wrapper.properties
Run Gradle Wrapper at the top level of the project
Unix:
./gradlew wrapper
Windows:
gradlew.bat wrapper
Build with Gradle Wrapper.
Unix:
./gradlew build
Windows:
gradlew.bat build
Find in your project's structure in Android Studio this file
Open gradle-wrapper.properties and change this line:
distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip
with
distributionUrl=https\://services.gradle.org/distributions/gradle-2.8-all.zip
It should work
I am working on the Sample in the below blog
https://www.firebase.com/blog/2015-10-01-firebase-android-app-engine-tutorial.html
The projects fails to compile after adding the dependency
compile 'com.firebase:firebase-client-android:2.3.1'
Other dependencies compile without any issue.
'com.android.support:appcompat-v7:23.0.1'
'compile 'com.android.support:design:23.0.1'
Where am I going wrong ?
here is my module build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.tri.todoapp"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE-FIREBASE.txt'
exclude 'META-INF/NOTICE'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
// testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.android.support:design:23.0.1'
compile 'com.firebase:firebase-client-android:2.4.0'
}
Top-level gradle
// 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:1.3.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
The project fails to compile because version 2.3 doesn't exists. You should use 2.3.1:
compile 'com.firebase:firebase-client-android:2.3.1'
or the newest 2.4.0:
compile 'com.firebase:firebase-client-android:2.4.0'
You can find more information here:
https://www.firebase.com/docs/android/quickstart.html
We are talking about Google api versions without mentioning Google Repository version.
The actual problem here is that your Google Repository doesn't "know" about the firebase version you all were trying to use.
I got same error while following the official firebase documentation
My app-level build.gradle file looked like this:
apply plugin: 'com.android.application'
android {
// ...
}
dependencies {
// ...
compile 'com.google.firebase:firebase-core:10.2.1'
compile 'com.google.firebase:firebase-messaging:10.2.1'
}
apply plugin: 'com.google.gms.google-services'
My Google Repository version was 44
You can check yours in
SDK Manager>Android SDK> SDK Tools (tab)
Latest version is 46 (at the time of writing this)
I updated to latest Google Repository version and the problem was solved!
You can update by checking "Google Repository" under SDK Tools tab and click "Apply" to update Google Repository to latest version
If you do not wish to update your Google Repository version, you can still resolve the issue by lowering your firebase api version slighlty.
For my case, changing app-level build.gradle file to the following also fixes my problem:
apply plugin: 'com.android.application'
android {
// ...
}
dependencies {
// ...
compile 'com.google.firebase:firebase-core:10.2.0'
compile 'com.google.firebase:firebase-messaging:10.2.0'
}
apply plugin: 'com.google.gms.google-services'
firebase version has been lowered to version 10.2.0 from 10.2.1
This works because 10.2.0 is known to Google repository ver 44.
I hope this answer will help many in future.
There are two modules you need to add firebase to:
The android module: You should use the "Add Firebase" checkbox that appears in project structure that will add 2.3.1 to the android app.
The backend module requires 2.4 to run in app engine and those steps require you to add the dependency manually.
In that case, be sure you are adding the jvm client -- not the "android" client for app engine.
compile 'com.firebase:firebase-client-android:2.4.0'
It happens because this version
compile 'com.firebase:firebase-client-android:2.3'
doesn't exist.
You can use one of these:
compile 'com.firebase:firebase-client-android:2.4.0'
compile 'com.firebase:firebase-client-android:2.3.1'
compile 'com.firebase:firebase-client-android:2.3.0'
Pay attention.
compile 'com.firebase:firebase-client-android:2.3.0'
is different from
compile 'com.firebase:firebase-client-android:2.3'
You can find the full list in maven:
using
compile 'com.firebase:firebase-client-android:+'
worked for me.
I had the exact same problem today, but with version 2.4.1. I could however not open the link l jcenter.bintray.com/com/firebase/firebase-client-android/2.4.1/ as mentioned by Mattia Maestrini.
Solution for me: Deactivate my VPN, and then it worked.
it looks like it was a dex limit error. Adding the Firebase SDK must have put me over the limit, to fix this i had to add multiDexEnabled true in the defaultConfig section of my app:build.gradle file as well as compile 'com.android.support:multidex:1.0.0' in the dependencies
Here is my gradle
gradle for project
// 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:1.5.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
gradle module app
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.tranetech.openspace.firebasedemo"
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE-FIREBASE.txt'
exclude 'META-INF/NOTICE'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.2.1'
compile 'com.firebase:firebase-client-android:2.5.2+'
compile 'com.firebaseui:firebase-ui:0.3.1'
compile 'com.android.support:multidex:1.0.0'
}
I not sure you still working with that project or not, but I also faced the same problem with you, my solution is
In your build.gradle (outside the app folder one), add
buildscript {
repositories {
jcenter()
}
dependencies {
////
classpath 'com.google.gms:google-services:3.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
and in your module build.gradle, add
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.+'
compile 'com.android.support:design:23.+'
compile 'com.google.firebase:firebase-core:9.2.1'
compile 'com.google.firebase:firebase-database:9.2.1'
compile 'com.firebase:firebase-client-android:2.4.0'
}
apply plugin:
'com.google.gms.google-services'// <- this code
And the last, don't forget to download google-services.json put in your app folder, the path should look like \yourapplication\app, you also can refer to this link for download google-services.json file. Download a configuration file
compile is deprecated. You should use:
implementation 'com.firebase:firebase-client-android:2.5.2'