开发者

unable to edit R.java Android using Eclipse

I am new to Android. Well the problem I am facing is that I have two layouts. One is main.xml and another that I made was relative_layout.xml.

I did not give it an @+id/ to this layout so the default id was relative_layout01.xml but when I gave this an id the old one still remain in my R.ja开发者_运维百科va and when I edit R.java it again generated the old version of file.

I want to delete relative_layout01.xml reference as it does not exists as I have given a name to my layout.

Attaching an image for reference.

unable to edit R.java Android using Eclipse


R.java should be refreshed automatically.

Maybe you still have some references to it in your code (setContentView(R.relative...) or you still have it as an activity in AndroidManifest.xml?

Sorry for the noobish answer. Just my 2 cents..


Delete import android.R, and R.java completely, rebuild and it would be fine

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜