问题: ImageView cannot be resolved to a type

报这样的错误是没有加载MainActivity.java文件中加入

import android.widget.ImageView;

为了避免类似错语,可以这样的写

import android.widget.*;

这样的写的好处是以后遇到类似EditText,TextView等都可以解决。

ImageView cannot be resolved to a type的更多相关文章

  1. myeclipse 开发环境下,提示 String cannot be resolved to a type

    从SVN上下载项目,所有代码都有下来,在本地编译,java类总是报出n多红叉,惨不忍睹,String cannot be resolved to a type都出来了,以为是jar包未被加载,于是pr ...

  2. Eclipse “cannot be resolved to a type” 错误

    eclipse中遇到了“XX cannot be resolved to a type”的报错信息.网上找了些资料,本文将做以简单总结.     (1)jdk不匹配(或不存在) 项目指定的jdk为“j ...

  3. javax.servlet.ServletException cannot be resolved to a type错误解决方法

    在页面中使用全局路径时${pageContext.request.contextPath}出现javax.servlet.ServletException cannot be resolved to ...

  4. eclipse中编译时enum出现cannot be resolved to a type错误

    eclipse中编译时enum出现cannot be resolved to a type错误 通常是因为eclise使用的jdk版本的问题...默认是使用的是jdk1.5 应该去选择成jdk1.6或 ...

  5. javax.servlet.jsp.JspException cannot be resolved to a type

    javax.servlet.jsp.PageContext cannot be resolved to a type javax.servlet.jsp.JspException cannot be ...

  6. (转)Eclipse “cannot be resolved to a type” error

    原:http://www.cnblogs.com/xuxm2007/archive/2011/10/20/2219104.html Eclipse “cannot be resolved to a t ...

  7. Httpservlet cannot be resolved to a type的原因与解决方法

    刚开始学习Servlet,在Eclipse中新建了一个Servlet,不过页面上报错: Httpservlet cannot be resolved to a type,显然是Eclipse找不到相应 ...

  8. "XX cannot be resolved to a type "eclipse报错及解决说明

    转自:http://zhaoningbo.iteye.com/blog/1137215 引言: eclipse新导入的项目经常可以看到“XX cannot be resolved to a type” ...

  9. maven中解决javax.servlet.jsp.PageContext cannot be resolved to a type

    在eclipse环境下用maven出现:javax.servlet.jsp.PageContext cannot be resolved to a type. 这是由于没有引入jsp-api引发的问题 ...

随机推荐

  1. 通过IP地址屏蔽各种“推广”

    事情的起因是这样的:最近老是发现iPhone应用的底部出现各种横条广告,一开始以为是Google的广告推广,所以没管它,但是最近这些广告越来越猖狂,里面的内容越来越垃圾.今天仔细一看,原来不是Goog ...

  2. select 选择的制作

    我说的select选择是指 手机端的话,一般考虑元素 + 伪类制作 .checkbox{ border:1px solid #987;width:16px;height:16px; } .checkb ...

  3. C#.NET中数组、ArrayList和List三者的区别

    数组在C#.NET中是最早出现的,在内存中是顺序连续存储的,所以它的索引速度非常快,赋值与修改元素也很简单:但是,也正因为数组是顺序连续存储的,在两个数据间插入数据是很不方便的,而且在声明数组的时候必 ...

  4. mysql5.6 主从同步

    主库IP:192.168.220.3 从库IP:192.168.220.4 1.主库配置编辑my.cnf: # For advice on how to change settings please ...

  5. Web存储-Web Storage

    /* // 如下是initStorageEvent()方法参数,其中两个参数我默认写成false了,一般都不用改动 initStorageEvent(eventType, false, false, ...

  6. WindowsService 安装 cmd

    步骤: 1.运行--〉cmd:打开cmd命令框 2.在命令行里定位到InstallUtil.exe所在的位置 InstallUtil.exe 默认的安装位置是在C:/Windows/Microsoft ...

  7. HTTP常见头域

    近期没需求,也没什么心情去看书,就总结一下自己以前看的HTTP协议基础内容吧.(会很乱,可能不适合一点都没接触过HTTP协议的人观看) 一.HTTP Request header 1.Cache头域 ...

  8. wordpress取文章时间

    wordpress的时间处理, 取文章的本地时间用get_the_time('c'),其中c可以用“D, d M Y H:i:s"等替代. 取文章的UTC时间用get_post_time(' ...

  9. mongoperf

    官方文档 mongoperf is a utility to check disk I/O performance independently of MongoDB. It times tests o ...

  10. Ubuntu 16.04 LTS发布

    [Ubuntu 16.04 LTS发布]Ubuntu 16.04 LTS 发布日期已正式确定为 2016 年 4 月 21 日,代号为 Xenial Xerus.Ubuntu16.04 将是非常受欢迎 ...