繁体   English   中英

找不到属性“ facebook”的资源标识符

[英]No resource identifier found for attribute “facebook”

我看到研究这段代码

我有例外:

Error:(15) No resource identifier found for attribute 'com_facebook_confirm_logout' in package 'by.polykov.myclientsocialnetwork'
Error:(15) No resource identifier found for attribute 'com_facebook_tooltip_mode' in package 'by.polykov.myclientsocialnetwork'
Error:(38) No resource identifier found for attribute 'com_facebook_preset_size' in package 'by.polykov.myclientsocialnetwork'
Error:Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'E:\Android SDK\build-tools\21.1.2\aapt.exe'' finished with non-zero exit value 1

<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:facebook="http://schemas.android.com/apk/res-auto"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="#FFF"
    >
    <LinearLayout android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:background="#FFF"
        android:id="@+id/main_ui_container">
        <com.facebook.login.widget.LoginButton
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="5dp"
            android:layout_gravity="center_horizontal"
            facebook:com_facebook_confirm_logout="false"
            facebook:com_facebook_tooltip_mode="never_display"
            />
        <LinearLayout
            android:layout_width="150dp"
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal"
            android:gravity="center_horizontal"
            android:orientation="vertical"
            >
            <TextView
                android:id="@+id/greeting"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="10dp"
                android:layout_gravity="center"
                android:textColor="#333"
                android:textSize="18sp"/>
            <com.facebook.login.widget.ProfilePictureView
                android:id="@+id/profilePicture"
                android:layout_height="wrap_content"
                android:layout_width="wrap_content"
                android:gravity="center_horizontal"
                android:layout_marginBottom="10dp"
                facebook:com_facebook_preset_size="normal"/>
            <Button
                android:id="@+id/postStatusUpdateButton"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:text="Post Status Update"
                />
            <Button
                android:id="@+id/postPhotoButton"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:text="Post Photo"
                />

        </LinearLayout>
    </LinearLayout>

</LinearLayout>

我使用compile 'com.facebook.android:facebook-android-sdk:4.0.0'

怎么了? 请帮助

@ toni7777解决的解决方案是在最新版本的Facebook SDK中添加编译依赖项:

dependencies { 
    compile 'com.facebook.android:facebook-android-sdk:4.1.0' 
}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM