textview cannot be resolved to a type 的解决办法
2012-10-28 03:32
435 查看
在添加
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 啦
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 啦
相关文章推荐
- textview cannot be resolved to a type 解决方法
- textview cannot be resolved to a type 解决方法
- textview cannot be resolved to a type 解决方法
- InterceptorRef cannot be resolved to a type 错误解决办法
- java.lang.ClassCastException: android.widget.ImageView cannot be cast to android.widget.TextView解决办法
- Servlet问题:servlet cannot be resolved to a type解决办法
- "Button cannot be resolved to a type" 解决办法
- Eclipse javax.servlet.jsp.PageContext cannot be resolved to a type 错误玄学解决办法
- Android开发时,写MainActivity.java时出现TextView cannot be resolved to a type
- jsp页面出现“String cannot be resolved to a type”错误解决办法
- servlet cannot be resolved to a type解决办法
- Maven创建Web项目,jsp引入静态文件提示报错(javax.servlet.ServletException cannot be resolved to a type ) 解决办法
- HttpServlet cannot be resolved to a type解决办法
- TextView cannot be resolved to a type(Google Android)
- jsp页面出现“String cannot be resolved to a type”错误解决办法
- TextView cannot be resolved to a type
- Eclipse javax.servlet.jsp.PageContext cannot be resolved to a type 错误解决办法
- Eclipse javax.servlet.jsp.PageContext cannot be resolved to a type 错误解决办法
- HttpServlet cannot be resolved to a type 解决办法
- 出现错误:TextView cannot be resolved to a type