在xml布局文件中,已经定义了xmlns,但是我在编译时遇到此错误:找不到属性的资源标识符。这是为什么?感谢
我正在关注Facebook网站https://developers.facebook.com/docs/getting-started/facebook-sdk-for-android/3.0/上的Facebook开发教程,布局文件如下:
<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>
答案 0 :(得分:3)
我弄清楚了,必须用/res-auto
res/com.facebook.samples.profilepicture
答案 1 :(得分:0)
您的布局文件看起来是正确的。检查'project.properties'文件中的'android.library.reference.1'值是否指向正确的位置。
答案 2 :(得分:0)
在API级别17中正确支持res-auto功能。必须使用自定义属性应用于所有布局。它会在构建时自动替换为eclipse。