Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 ?

like image 538
Rana Osama Avatar asked Sep 28 '26 13:09

Rana Osama


2 Answers

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.

like image 117
Anirudh Ramanathan Avatar answered Oct 01 '26 03:10

Anirudh Ramanathan


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>

like image 33
Eight Avatar answered Oct 01 '26 04:10

Eight



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!