'com.android.support:support-v4:27.1.1' an

2019-09-19 10:19发布

问题:

I have an error compatibility with the dependencies 'com.android.support:support-v4:27.1.1' when I implement 'com.firebaseui:firebase-ui-auth:3.2.2'

This is the code:

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:support-v4:27.1.1'
    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'
    implementation 'com.google.android.gms:play-services-auth:11.8.0'

    //firebase
    implementation 'com.google.firebase:firebase-core:11.8.0'
    implementation 'com.google.firebase:firebase-database:11.8.0'
    implementation 'com.google.firebase:firebase-auth:11.8.0'
    implementation 'com.firebaseui:firebase-ui-auth:3.2.2'
}

回答1:

To solve this, please change the following line of code:

implementation 'com.firebaseui:firebase-ui-auth:3.2.2'

to

implementation 'com.firebaseui:firebase-ui-auth:3.1.3'

Or change all these lines of code:

implementation 'com.google.android.gms:play-services-auth:11.8.0'

//firebase
implementation 'com.google.firebase:firebase-core:11.8.0'
implementation 'com.google.firebase:firebase-database:11.8.0'
implementation 'com.google.firebase:firebase-auth:11.8.0'
implementation 'com.firebaseui:firebase-ui-auth:3.2.2'

to

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

//firebase
implementation 'com.google.firebase:firebase-core:15.0.2'
implementation 'com.google.firebase:firebase-database:15.0.0'
implementation 'com.google.firebase:firebase-auth:15.1.0'
implementation 'com.firebaseui:firebase-ui-auth:3.3.1'

More details here and here.

According to your comments, the following implementations are also needed:

implementation 'com.android.support:animated-vector-drawable:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'