自定义view,且新加了一些自定义的命名,那么需要添加声明到根上。如果忘了添加也会报这个错误。

xmlns:app="http://schemas.android.com/apk/res-auto"

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"   
xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" >



注意:本文归作者所有,未经作者允许,不得转载