All firebase libraries must be either above or bel

2020-03-01 02:52发布

I have checked my app build.gradle file and these are the only lines that are related to firebase in them

/***
 * Firebase
 */
implementation 'com.google.firebase:firebase-core:15.0.0'
implementation 'com.google.firebase:firebase-messaging:15.0.0'
implementation('com.crashlytics.sdk.android:crashlytics:2.9.1@aar') {
    transitive = true
}
implementation 'com.google.firebase:firebase-ads:15.0.0'

I do not have any library that makes use of firebase so I don't think there can be an issue with a library using an older version.

The problem is I can't build gradle, clean project or rebuild project with the new v15 version of firebase as it keeps throwing the error All firebase libraries must be either above or below 14.0.0

10条回答
三岁会撩人
2楼-- · 2020-03-01 03:10

I have not found the question yet in your question But if you want the latest version of Firebys offices This is compatible with version 27.0.3

//Firebase
implementation 'com.google.firebase:firebase-database:11.8.0'
implementation 'com.google.firebase:firebase-storage:11.8.0'
implementation 'com.google.firebase:firebase-auth:11.8.0'
implementation 'com.firebaseui:firebase-ui-database:2.0.1'
implementation 'com.google.firebase:firebase-messaging:11.8.0'
implementation 'com.google.firebase:firebase-core:11.8.0'
查看更多
爷、活的狠高调
3楼-- · 2020-03-01 03:13

For example change implementation 'com.google.android.gms:play-services-appindexing:9.8.0' to implementation 'com.google.firebase:firebase-appindexing:15.0.1' , as this suggestion comes in the warning in build.gradle.

查看更多
等我变得足够好
4楼-- · 2020-03-01 03:15
apply plugin: 'com.google.gms.google-services'

put it under this line.

apply plugin: 'com.android.application'

it worked for me.

查看更多
劫难
5楼-- · 2020-03-01 03:16

Remove this from App level gradle

implementation 'com.google.android.gms:play-services-maps:15.0.0'

and then try these versions

compile 'com.google.firebase:firebase-core:11.8.0'
compile 'com.google.firebase:firebase-messaging:11.8.0'
compile 'com.google.firebase:firebase-database:11.8.0'
compile 'com.google.firebase:firebase-auth:11.8.0'

this one worked for me... tanx

查看更多
SAY GOODBYE
6楼-- · 2020-03-01 03:18

While Changing google or firebase dependency version make sure you update the compatible version in project level gradle too.

查看更多
别忘想泡老子
7楼-- · 2020-03-01 03:19

Change all of your firebase libraries to the same version.

查看更多
登录 后发表回答