将引用的自定义控件的xml文件中的最外层布局上面添加xmlns:sat=“http://schemas.android.com/apk/res/控件所在位置的包名”可是在运行时就会报java.lang.NoSuchFieldError:包.R$id.xxx错。同时还会出现no resource identifier found for attribute 的错误。
将xmlns:sat=“http://schemas.android.com/apk/res/控件所在位置的包名”更改为
http://schemas.android.com/apk/res-auto 就不会报错了