8 July 2014

R.java has been deleted !

You may have a problem sometimes . The generated file R.java can be deleted automatically. What to do then ?

You may have encountered some errors and to prevent it you may have cleaned it by pressing Clean from Project in your Menu-bar .
project clean

You have a file in your gen folder R.java
gen folder

It may go missing and you may get lots of errors in your classes .(like : R cannot be resolved to a type) . Do not try to correct it by importing R .
r not resolved
  1. Just check that there are no errors in your layouts (xml files) from res .
  2. There may be some problem in the style.xml or some API level problem in AndroidMainfest.xml
  3. Build your project by going to Project in your Menu-bar and click on Build All .
build all

 .You may see that all your errors corresponding to R.java are been disappeared .

Stay Tuned with Made In Android

Previous Page Next Page Home
Top