- 博客(1)
- 收藏
- 关注
原创 setContentView 设置布局文件时,cannot be resolved or is not a field
最近在用setContentView()设置Activity的布局文件时,会报错,如“weather_layout cannot be resolved or is not a field”,导致在使用findViewById()获取xml文件中的控件时,也会报错,如“city_name cannot be resolved or is not a field”,具体代码见附图。 解决方法: 1
2015-07-14 10:48:36
2780
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人