在添加
TextView myTextView=(TextView)this.findViewById(R.id.myTextView);
Button myButton=(Button)this.findViewById(R.id.myButton);
时,发生了"textview cannot be resolved to a type“错误
由于Android 版本不同发生此类错误,解决办法
在开头引入
import android.widget.Button;
import android.widget.TextView;
或者 import android.widget.*; 就OK 啦