首页 > 其他 > 详细

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

时间:2014-12-12 14:46:15      阅读:367      评论:0      收藏:0      [点我收藏+]

Do not modify the R class. The error means there‘s something syntactically wrong with your XML layouts and R cannot be auto-generated. Try looking there and post the xml code you‘re not sure about, if any.

Edit : also: remove "import android.R" from imports at top of file (if there)

我的解决方案是去掉了import android.R这一行,增加了现有的包名import com.example.avtivitytest.R;

//import android.R;
import com.example.avtivitytest.R;

 

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

原文:http://www.cnblogs.com/zl0372/p/android_01.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!