簡體   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