Rana Osama
Rana Osama

Reputation: 1323

Android : Error in R.java class

I am having a strange error that I can not resolve in class R.java in my android application

the error is in the following line

 public static final class string {

            public static final int =0x7f05002f;

because it has no variable after the int

can anyone help me please with this error ?

Upvotes: 3

Views: 5209

Answers (3)

Anirudh Ramanathan
Anirudh Ramanathan

Reputation: 46728

R.java is auto-generated, and is not meant to be edited manually.

If you face issues, delete R.java and rebuild your project and it will be generated again, according to your layout.

If problem persists, look into your xml files ( strings.xml, layout.xml, etc) for any errors.

Upvotes: 6

Eight
Eight

Reputation: 4284

check your strings.xml file.It seems like you have saved some value without assigning any name to that.

Look for an entry not having any name attribute. something like <string>8</string>, either remove that or assign a name attribute to that like <string name="anyname">8</string>

Upvotes: 2

SidJ
SidJ

Reputation: 677

A bad R.java would mean an error somewhere else. If deleting it and rebuilding the projetc doesn't solve it look at your manifest and other xml resources for errors.

Upvotes: 0

Related Questions