You must supply a layout_width attribute. 错误解决
16lz
2022-06-12
布局文件如下:
今天在编辑android布局文件时,后台提示以下错误:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.pubproject/com.example.pubproject.MainActivity}: java.lang.RuntimeException: Binary XML
file line #23: You must supply a layout_width attribute.
经反复试验:原因是TextView只要缺少 android:layout_width="wrap_content" 这一句,就会报错。具体原因待查中。
更多相关文章
- Cocos2d-x教程(38)-iOS移植Android
- Android常见问题及讨论(46-50)
- Android(安卓)Ant批量打包
- [Android]解决failed to get the required ADT version from sdk
- Android简单文件浏览器源代码
- anroid 7.1添加自定义api服务
- Android使用GET_CONTENT Action获取打开相应文件类型的应用
- Android播放在线音乐文件
- NPM 和webpack 的基础使用