机器人,XMLNS,没有资源indentifier错误 [英] android, xmlns, No resource indentifier error

查看:176
本文介绍了机器人,XMLNS,没有资源indentifier错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在一个XML布局文件,该XMLNS已经定义,但我得到在编译时这个错误:未找到属性资源标识符。这是为什么?谢谢

我继facebook网站的https://developers.facebook.com/docs/getting-started/facebook-sdk-for-android/3.0/布局文件如下:

 <滚动型的xmlns:机器人=htt​​p://schemas.android.com/apk/res/android
        的xmlns:程序=htt​​p://schemas.android.com/apk/res-auto
    机器人:layout_width =match_parent
    机器人:layout_height =match_parent
    >    < com.facebook.widget.ProfilePictureView
            机器人:ID =@ + ID / profilepic
            机器人:layout_height =WRAP_CONTENT
            机器人:layout_width =0dp
            机器人:layout_weight =1
            应用:preset_size =大的应用程序:is_cropped =真
    />
   < /滚动型>


解决方案

我想通了,要更换 / RES-汽车水库/com.facebook.samples.profilepicture

In an xml layout file, the xmlns is already defined, but I get this error at compile time: No resource identifier found for attribute. Why is that? thanks

I'm following a Facebook dev tutorial on facebook site https://developers.facebook.com/docs/getting-started/facebook-sdk-for-android/3.0/ the layout file is as follows:

   <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    >

    <com.facebook.widget.ProfilePictureView
            android:id="@+id/profilepic"
            android:layout_height="wrap_content"
            android:layout_width="0dp"
            android:layout_weight="1"
            app:preset_size="large" app:is_cropped="true"
    />
   </ScrollView>

解决方案

I figured it out, have to replace /res-auto with res/com.facebook.samples.profilepicture

这篇关于机器人,XMLNS,没有资源indentifier错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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