Android 为什么 Facebook SDK 注销按钮不显示?

标签 android facebook android-gradle-plugin androiddesignsupport facebook-sdk-4.x

我开发了一个带有facebook登录的应用程序,登录过程没有问题。但是当我想注销时没有看到按钮。

损坏的应用程序屏幕截图

BROKEN APP

工作应用截图

WORKING APP

损坏的应用程序 gradle 文件;

apply plugin: 'com.android.application'

android {
    compileSdkVersion 24
    buildToolsVersion "24.0.1"
    defaultConfig {
        applicationId "com.ex.ex"
        minSdkVersion 15
        targetSdkVersion 24
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

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'
    })

    // Glide image library
    compile 'com.android.support:appcompat-v7:24.2.1'
    compile 'com.android.support:design:24.2.1'
    compile 'com.android.support:support-v4:24.2.1'
    compile 'com.github.bumptech.glide:glide:3.7.0'
    compile 'com.google.android.gms:play-services-auth:9.2.1'
    compile 'com.facebook.android:facebook-android-sdk:4.1.0'

    testCompile 'junit:junit:4.12'
}

apply plugin: 'com.google.gms.google-services'

问题的根源是什么?我怎样才能解决这个问题?

谢谢。

最佳答案

尝试关注Facebook for Android Documentation

并使用最新版本编译'com.android.support:appcompat-v7:25.2.0'

Follow this tutorial

compile 'com.google.android.gms:play-services:10.2.0'

关于Android 为什么 Facebook SDK 注销按钮不显示?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42434174/

相关文章:

android - 如何将 Activity 转换为 fragment 以在抽屉中使用

facebook - 您最想复制或最受欢迎的 Web API 是什么?

Cordova 构建更改 gradle-wrapper.properties 文件中的 distributionUrl

android - 想要在构建特定样式之前附加到我的build.gradle。这可能吗?

Android - 将compileSdkVersion更改为16会导致编译错误(gradle)

java - 高分未保存在 Libgdx 中

Android 模拟器和 AVD 无法在 Surface Pro 上运行

java - 错误: method onCreate(Bundle) is already defined in class MainActivity

ios - Facebook登录统一iOS游戏而无需重定向

facebook - 您能否将您的 OpenGraph 对象链接到不同的 URL?