[Android] R.layout.main 找不到的问题
16lz
2021-01-24
在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.
更多相关文章
- android studio 一次编译错误:Error:Minimum supported Gradle ve
- android 常见错误:fabric connection timeout
- android出现段错误时的查找定位的方法
- Android常见错误汇总
- Gradle 3.1 修改apk文件名和输出路径
- Android(安卓)studio 3 gradle配置问题
- Android(安卓)- jni - error:More than one file was found with
- Android(安卓)Studio Error:warning: Ignoring InnerClasses att
- TextView 富文本学习六 - 设置了ClickableSpan导致内存泄漏