我在我的 android 项目中使用这些依赖项。
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.4.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.firebase:firebase-auth:11.4.2'
compile 'com.facebook.android:facebook-android-sdk:4.27'
compile 'com.android.support:design:25.4.0'
compile "com.hanks:htextview-evaporate:0.1.1"
compile 'com.rengwuxian.materialedittext:library:2.1.4'
compile 'com.google.firebase:firebase-database:11.4.2'
testCompile 'junit:junit:4.12'
}
现在的问题是
compile 'com.android.support:appcompat-v7:25.4.0'
它向我展示了这样的警告(在更新所有库的版本之后):
All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes)
当我删除 Facebook Sdk Lib 时。 编译 'com.facebook.android:facebook-android-sdk:4.27'
。
一切正常,但显然我需要它。我不知道我应该做什么,谁能帮助我。
最佳答案
您收到错误消息是因为 Facebook Sdk 正在使用 Google 支持库的另一个版本。您需要使用与您的 gradle 支持库相同的版本编译所有在鼠标悬停时会发出错误警告的库。
关于android - Facebook Sdk 版本和支持 :appcompat version issue,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47099198/