1. 删除R.Java文件,这时,系统会重新生成一个R.java;

  2. 删除java代码中的”import Android.R“文件。
  3. 重新导入正确的包。

出现 cannot be resolved or is not a field 错误的更多相关文章

  1. Andrion错误解决:cannot be resolved or is not a field

    cannot be resolved or is not a field   解决这个问题:   选择project菜单中的clean,选择你的项目,先clean一下, 再去看看Activity中有没 ...

  2. layout cannot be resolved or is not a field

    去除代码activity代码页面顶部中的 import android.R;这句就可以消除红色波浪线的main cannot be resolved or is not a field类似这个错误了

  3. "cannot be resolved or is not a field"问题解决 (转载)

    转自:http://blog.csdn.net/liranke/article/details/16803295 在修改了资源文件后,出现“"cannot be resolved or is ...

  4. R.id.layout等不能识别:cannot be resolved or is not a field

    Do not modify the R class. The error means there's something syntactically wrong with your XML layou ...

  5. “main cannot be resolved or is not a field”解决方案

    .layout.main总是在layout上有错误提示波浪线. 解决方法: (1) 删除"import android.R;". (2) 勾选上Eclipse中的"Pro ...

  6. main cannot be resolved or is not a field

    今天在做XML解析的时候,总是给我报 XML Parsing Error: XML or text declaration not at start of entity 的错误,后来查了下讲大概意思是 ...

  7. Android错误之--activity_main cannot be resolved or is not a field

    一般在copy别人的项目中会easy出现本错误,截图例如以下:

  8. raw cannot be resolved or is not a field解决办法

    解决raw文件夹问题 查看左侧项目/res文件夹下是否有raw文件夹,(一定是放到res文件夹下,raw在项目开始创建时候不会自动创建,所以要自己创建)

  9. 网站开发进阶(十六)错误提示:Multiple annotations found at this line:- basePath cannot be resolved to a variable

    错误提示:Multiple annotations found at this line: basePath cannot be resolved to a variable 出现以上错误,主要是由下 ...

随机推荐

  1. Java多线程中的死锁问题

    Java程序基本都要涉及到多线程,而在多线程环境中不可避免的要遇到线程死锁的问题.Java不像数据库那么能够检测到死锁,然后进行处理,Java中的死锁问题,只能通过程序员自己写代码时避免引入死锁的可能 ...

  2. jq focus 在火狐(Firefox)下无效

    今天写代码的时候发现,在blur事件里面写focus获取焦点无效, $input.blur(function(){ ……………… $input.focus(): } 而且只是在火狐下面无效而已,很明显 ...

  3. vim快捷键

    #vim  filename :scriptname //查看vim加载了哪些脚本 :set nu //设置行号 :set tabstop=4 //设置一个tab为4个空格长度 :set ai //设 ...

  4. QWhatsThis的用法

    QWhatsThis,为任何widget提供简单的描述,回答"What's This?"这个问题. 示例:(在MainWindow下运行) 定义全局变量 QAction *newA ...

  5. #id+变量

    "#id"在解析的时候看成是一个整体字符串或者是一个具体的selector了,只有写成"#"+id,这是才会在解析时把id变量的值进行替换成被赋予的变量的值.链 ...

  6. Codevs堆练习

    Codevs堆练习 黄金:2830.2879.2995.3110 钻石:1052.1063.1245.1246.2057.2573.3377 大师:1021.1765.2069.2913.3032

  7. [LeetCode] Reconstruct Itinerary 重建行程单

    Given a list of airline tickets represented by pairs of departure and arrival airports [from, to], r ...

  8. [LeetCode] Rotate List 旋转链表

    Given a list, rotate the list to the right by k places, where k is non-negative. For example:Given 1 ...

  9. yii2使用小知识(连续补充)

    1,打印ar或者query的原始sql: $query = (new \yii\db\Query())->select(['a.username','b.item_name'])->fro ...

  10. 使用ARP欺骗, 截取局域网中任意一台机器的网页请求,破解用户名密码等信息

    ARP欺骗的作用 当你在网吧玩,发现有人玩LOL大吵大闹, 用ARP欺骗把他踢下线吧 当你在咖啡厅看上某一个看书的妹纸,又不好意思开口要微信号, 用arp欺骗,不知不觉获取到她的微信号和聊天记录,吓一 ...