自定义View XML文件出现No resource identifier found for attribute ‘xxx’ in package ‘xxx.xxx.xxx’错误解决方法
近期项目中,在更换包名以后,有自定义View的XML文件中出现No resource identifier found for attribute ‘xxx’ in package ‘xxx.xxx.xxx’问题,多番查找后发现问题出在xml文件的开头 xmlns:android_custom里面,必须将这里面的包名改成你现在引用的包名
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android_custom="http://schemas.android.com/apk/res/com.xxxx.xxxx" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/default_bg_color" >
xmlns:android_custom=”http://schemas.android.com/apk/res/com.xxxx.xxxx” 将XXXX后面的代码改成你所在的包名即可
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。