Button cannot be resolved to a type
解决方法
不知道为什么,解决办法就是添加引用如下:
遇到错误
"setText cannot be resolved or is not a field"
后将设置变量用string分离,即解决
String TVstring="这是我的第一个文本";
String BTstring="这是第一个按钮文本"+"\n"+"test";
myTextView.setText(TVstring);
myButton.setText(BTstring);
希望对大家有用
安卓开发 Button cannot be resolved to a type 解决方法
原文:http://blog.csdn.net/jianxia_wzx/article/details/18276183