在Eclipse编译第一个Android程序的时候报出这样的错误:

setContentView(R.layout.main);  出错。
报告说:As of ADT 14, resource constants in library projects are no longer final.

但是,最终的原因和ADT 14没有什么关系,看下面的帖子:

http://stackoverflow.com/questions/6002756/setcontentviewr-layout-main-error

If you fix imports before R.java has been generated for your project (before building it the first time) it will add the line:

import android.R;

which will override the local R.java that you are trying to reference.

Deleting that line resolved the errors for me.

更多相关文章

  1. android studio 一次编译错误:Error:Minimum supported Gradle ve
  2. android 常见错误:fabric connection timeout
  3. android出现段错误时的查找定位的方法
  4. Android常见错误汇总
  5. Gradle 3.1 修改apk文件名和输出路径
  6. Android(安卓)studio 3 gradle配置问题
  7. Android(安卓)- jni - error:More than one file was found with
  8. Android(安卓)Studio Error:warning: Ignoring InnerClasses att
  9. TextView 富文本学习六 - 设置了ClickableSpan导致内存泄漏

随机推荐

  1. JVM的新生代跟老年代
  2. 用Python快速分析和预测股票价格
  3. 机器学习爱好者必读的入门指南
  4. 不变的就是变化本身(Vue学习笔记one)
  5. 用Python分析5187位CSDN博主数据,顺便把昨
  6. 用Excel、SQL、Python做数据分析有何不同
  7. 数据分析和数据科学的四个时代
  8. 笨办法学Python,其实一点都不笨
  9. 手把手教你用 Python 进行机器学习
  10. 如何正确的获取数据?