Android-添加Facebook SDK后出现Appcompat-v7:27.1.1错误

时间:2018-08-06 14:41:22

标签: android

这些是依赖项:

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.android.support.constraint:constraint-layout:1.1.2'
    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.android.support:cardview-v7:27.1.1'
}

当我添加implementation 'com.facebook.android:facebook-android-sdk:4.0.1'时,它会“破坏” implementation 'com.android.support:appcompat-v7:27.1.1',并显示错误:All com.android.support libraries must use the exact same version specification

All com.android.support libraries must use the exact same version specification的一些答案表明,我必须查看所有库,但看不到这里有什么问题:

enter image description here

有人可以解释吗?我是android的新手,我必须说这是一个可怕的烂摊子

1 个答案:

答案 0 :(得分:0)

尝试使用implementation 'com.facebook.android:facebook-android-sdk:4.35.0'