johnjohnsonson
johnjohnsonson

Reputation: 11

Why does Eclipse continually delete my R file when cleaning the project?

I am having alot of trouble with Eclipse destroying my android projects.

I finally managed to get it restore my R file after it messed up one of my xml files. Now it won't even create the gen folder after cleaning and building.

I have tried updating all the android tools, restarting eclipse etc.

This was after it gave me an error about not being able to connect to adb when trying to launch my app.

I can barely get through adding a few lines of code before something else goes wrong, is Eclipse always this buggy?

Any help/solutions would be greatly appreciated!

Upvotes: 0

Views: 147

Answers (2)

Markus
Markus

Reputation: 1767

I faced this problem many times before, the issue has always been on some layout files. Eclipse does not always highlite errors in these files. So you have to go through the ones you have changed recently and search for errors. After you have fixed the issues within these files eclipse should create the gen folder and R class.

Upvotes: 0

Shreenivas Chikati
Shreenivas Chikati

Reputation: 319

There is a problem in one of your xml files.Check all xml files clearly. Some times they dont show up error. Because of error in xml file R.java not getting created, even if you create it urself it will be deleted automatically untill and unless you find error in xml file and correct that error. There could be error in your manifest,layouts,values xml files, etc. and also check you drawable folders, check there file names it doesnt accept capital letters.

Upvotes: 1

Related Questions