android - Facebook Sdk 版本和支持 :appcompat version issue

标签 android facebook android-support-library facebook-sdk-4.x

我在我的 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/

相关文章:

Facebook Graph API event-id/comments?since=2014-02-01&until=2014-02-10 ,日期过滤器无效

安卓工作室 1.5.1 : Could not find property 'vectorDrawables'

javascript - cordova console.log - 我可以设置 "Tag"和 "Level"吗?

java - 如何在 ImageView 中使用的图像中定义可点击区域

ios - 使用 iOS FBSDK v4 (multipart/form-data) 上传到 facebook 时编码视频的正确方法

android - 错误:(28, 34)错误: package android. support.annotation不存在

android - Android Design Support Library 有哪些新功能以及如何使用它的 Snackbar?

java - 如何在android中的谷歌地图中获取方向导航

java - 使用 HttpURLConnection 的 Android 分段文件上传 - 400 错误请求错误

android - Facebook SDK for Android 4.1.0 分享对话框取消