开发者

R cannot be resolved-android

开发者 https://www.devze.com 2023-02-02 12:54 出处:网络
R cannot be resolved R.lay开发者_运维技巧out.main cannot be resolved error is repeating to me and i cant run any of my android program

R cannot be resolved R.lay开发者_运维技巧out.main cannot be resolved error is repeating to me and i cant run any of my android program

pls give any instruction


also probably delete this line which sometimes creeps up :

import android.R or something like that.


Are you using Eclipse? Try project -> clean

Otherwise: check your console in the bottom for errors that need fixing before your R is build


I just had a reoccurence of the dreaded "R cannot be resolved" error, and I went through all the usual fixes; make sure all resources have lower case names, do a clean, make sure there isn't an import android.R lurking somewhere... no luck.

After a couple of frustrating hours I realised I had saved a PaintShop Pro format file (something.psp) in a resource folder in the file system and Eclipse was pulling it into my res folder. Not being a .png, it choked, and that seemed to cause the problem. As soon as I removed the .psp the error disappeared.

Hope this helps prevent someone else pulling out their hair.

0

精彩评论

暂无评论...
验证码 换一张
取 消