final Button Button1=(Button)findViewById(R.id.button1);
final Button Button2=(Button)findViewById(R.id.button2);
while debuging an error appearing :button cannot resolved to a type;
add the following code in front:
import android.widget.Button;
problem solved.
final Button Button2=(Button)findViewById(R.id.button2);
while debuging an error appearing :button cannot resolved to a type;
add the following code in front:
import android.widget.Button;
problem solved.
recommend: if you have the similar problems ,try enter a key combination:ctrl+shift+O
2011-07-27
解决Android开发中按钮无法解析类型的问题
在Android开发过程中,遇到按钮无法解析类型导致的错误时,通过导入Button类可以解决问题。推荐遇到类似问题时,尝试使用快捷键Ctrl+Shift+O进行代码重构。
2785

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



