[Android] R.layout.main 找不到的问题
在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.