今天在自定义view的时候,我的程序结构是这样的
,
在布局文件里是这样的写的:
xmlns:app="http://schemas.android.com/apk/res/com.example.card.view.CardInputEditText",
然后就报了error: No resource identifier found for attribute 'epaysdk_type' in package 'com.example.card.view.CardInputEditText',
解决办法如下:
把xmlns:app="http://schemas.android.com/apk/res/com.example.card.view.CardInputEditText"改成 xmlns:app="http://schemas.android.com/apk/res/com.example.card",和清单文件里
package路径一致既可。