Error in adding dependency for firebase-ui-auth:2.3.0

余生颓废 提交于 2019-12-02 04:05:01

Check this link in the firebase UI readme:

If you would like to use a newer version of one of FirebaseUI's transitive dependencies, such as Firebase, Play services, or the Android support libraries, you need to add explicit compile declarations in your build.gradle for all of FirebaseUI's dependencies at the version you want to use.

For example if you want to use Play services/Firebase version FOO and support libraries version BAR add the following extra lines for each FirebaseUI module you're using:

Auth:

compile "com.google.firebase:firebase-auth:$FOO"
compile "com.google.android.gms:play-services-auth:$FOO"

compile "com.android.support:design:$BAR"
compile "com.android.support:customtabs:$BAR"
compile "com.android.support:cardview-v7:$BAR"

Then in your case you have to use:

compile "com.android.support:design:26.1.0"
compile "com.android.support:customtabs:26.1.0"
compile "com.android.support:cardview-v7:26.1.0"

compile 'com.firebaseui:firebase-ui-auth:2.3.0'

When your FirebasuUi Version is 2.3.0, your Firebase/Play Services Version must be 11.0.4

Your Library

//Add Library
compile 'com.android.support:design:26.1.0' //--->Same to your buildToolVersion
compile 'com.firebaseui:firebase-ui:0.2.0'  //--->2.3.0
compile 'com.google.android.gms:play-services-auth:11.2.2' //--->11.0.4
compile 'com.google.firebase:firebase-auth:11.2.2' //--->11.0.4

Note

Until now, the latest buildToolVersion is 26.0.2 .

I follow this suggestion:

Suggestion: add 'tools:replace="android:value"' to element at AndroidManifest.xml

So, adding this meta-data to my manifest resolve my problem:

<meta-data
    tools:replace="android:value"
    android:name="android.support.VERSION"
    android:value="26.1.0" />
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!