在跟着教程编写自定义控件时出现这样的错误:
<com.example.activitytest.TitleLayout
android:layout_height="wrap_content"
android:layou_width="match_parent" >
</com.example.activitytest.TitleLayout>
提示的错误是:error: No resource identifier found for attribute 'layou_width' in package 'android'
翻译:在包中找不到资源标识符--“layou_width”.
结果:原来是layout——width中少了一个“t”字符。
本文介绍了一种常见的自定义控件布局错误——拼写错误导致的问题,并给出了具体的解决方案。
3687

被折叠的 条评论
为什么被折叠?



