自定义view中错误:No resource identifier found for attribute X in package X

转自:http://blog.csdn.net/nwsuafer/article/details/42121521


正如in Gradle projects,always usehttp://schemas.Android.com/apk/res-auto for custom attributes所说的



网上查询资料发现要在命名空间后加上Manifest里定义的包名,但是加上之后还是不行,


然后

http://schemas.android.com/apk/res/com.xxx.xxx  

换成
http://schemas.android.com/apk/res-auto  


这样Gradle就会自动查找自定属性的

猜你喜欢

转载自blog.csdn.net/binguola/article/details/80729259