AZ_
AZ_

Reputation: 21899

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.java 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.alt text

Upvotes: 0

Views: 1866

Answers (2)

AshuKingSharma
AshuKingSharma

Reputation: 757

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

Upvotes: 0

Kakira
Kakira

Reputation: 856

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..

Upvotes: 1

Related Questions