Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

R.java deleted automatically: Android

Tags:

android

When I changed some design in .xml file, R.java file automatically deleted. How can I get back that file and what is the solution to resolve this problem, that in future this problem does not occure.

like image 661
Pankaj Kumar Avatar asked Dec 13 '22 16:12

Pankaj Kumar


1 Answers

check all your errors in xml files structure (layouts, string etc...) even if sometimes they are not easy to spot.

My advice is to undo the latest things you've done until you find where the errors were and fix them.

Once they are all fixed the R file will be created again (maybe you need to clean your project: project -> clean)

In the future just try not to break the xml files and this won't occur again xD

like image 123
maid450 Avatar answered Jan 14 '23 15:01

maid450