com.facebook.widget.ProfilePictureView - 错误:错误的解析XML:绑定preFIX [英] com.facebook.widget.ProfilePictureView - error: Error parsing XML: unbound prefix

查看:271
本文介绍了com.facebook.widget.ProfilePictureView - 错误:错误的解析XML:绑定preFIX的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是的,我有这个错误

<com.facebook.widget.ProfilePictureView 

行和这是一个已经被问过无数次的计算器一个问题,每一次似乎已经固定加入的xmlns:FB =htt​​p://schemas.android.com/apk/res -auto在顶部。那么这剪掉解决这个问题,我,不知道为什么:(那么我该怎么办?

line and this is a question that has been asked numerous times on stackoverflow, and every time it seems it has been fixed by adding xmlns:fb="http://schemas.android.com/apk/res-auto" at the top. Well that didnt solve it for me, dont know why :( So what do I do?

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:fb="http://schemas.android.com/apk/res-auto"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_marginTop="20dp"
    android:gravity="center_horizontal"
    android:orientation="horizontal" >

    <com.facebook.widget.ProfilePictureView
        android:id="@+id/selection_profile_pic"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:gravity="center_horizontal"
        app:is_cropped="true"
        facebook:preset_size="small" />
</LinearLayout>

我也试过

xmlns:facebook="http://schemas.android.com/apk/res/com.facebook.samples.profilepicture"

但没有工作,以及

but didnt work as well

这是我的project.properties文件:

This is my project.properties file:

target=android-18
android.library=false
android.library.reference.1=..\\actionbarsherlock
android.library.reference.2=..\\library
android.library.reference.3=../facebook-android-sdk-3.6.0/facebook

试图将其更改为

target=android-18
android.library=false
android.library.reference.1=..\\actionbarsherlock
android.library.reference.2=..\\library
android.library.reference.3=..\\facebook-android-sdk-3.6.0\facebook

但没有任何结果。

but no results either

推荐答案

您在你的XML两个错误。

You have two errors in your XML.

1)你没有申报命名空间应用程序

1) you have not declared the namespace "app"

2)你声明的名称空间的的xmlns:FB =htt​​p://schemas.android.com/apk/res-auto但是你闯民宅作为脸谱,即Facebook的: preset_size

2) you have declared the namespace xmlns:fb="http://schemas.android.com/apk/res-auto" but you are refering it as "facebook" i.e. facebook:preset_size

您可以通过

1)添加一个命名空间声明应用程序,即的xmlns:程序=htt​​p://schemas.android.com/apk/res-auto

1) Adding a namespace declaration for "app" i.e. xmlns:app="http://schemas.android.com/apk/res-auto"

2)重命名你的FB命名空间声明脸谱,即的xmlns:Facebook的=htt​​p://schemas.android.com/apk/res-auto

2) renaming your "fb" namespace declaration to "facebook" i.e. xmlns:facebook="http://schemas.android.com/apk/res-auto"

这篇关于com.facebook.widget.ProfilePictureView - 错误:错误的解析XML:绑定preFIX的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆