views:

217

answers:

3

edit: This is an Android project. My problem arose when I added a new .wav file to my 'raw' folder.

I seem to have gotten into an endless loop in Eclipse. I deleted my R.java file from my project. Choosing to "Clean" or "Build Project" has no effect (i.e. doesn't generate an R.java file, or put anything into the 'gen' folder, or create any .class files in the 'assets' folder).

I don't have the wrong package name in any of my classes or in my manifest.

I don't have any errors in any of my .xml files.

Every reference to 'R' in my classes are marked as errors, because the R.java file does not exist.

What can I do??

A: 

if you rebuild it is there any error message on the console? or are you using capital letters or other special characters in your wav file?

Roflcoptr
sry this should be a comment
Roflcoptr
A: 

Try deleting the wav file first. If it doesn't fix your problem, look under problems tab and it will give you a direction on what to do. A wav file under res/ shouldn't produce any problems, just make sure its name is valid in Java (don't use -, for example).

licorna
Yea I think I figured it out....I deleted the file and the errors were resolved. Then I added it again with all lowercase letters (newjob.wav as opposed to newJob.wav) and it worked. What a load of crap hahaha
Tom G
Then set the question as answered.
licorna
A: 

Another issue I noticed ... it seems that after closing and re-opening eclipse with a slightly invalid XML file, the XML was no longer recognised as having an error, but R.java refused to be generated correctly.

The offending XML attribute was:

<RelativeLayout ... android:layout_alignRight="+id/">

In hindsight, I had been intending to complete this with a valid id but I exited the program before I had finished. Eclipse did not pick up the error when I restarted later, except to generate an invalid R.java with a missing VariableDeclaratorId (and no indication as to what caused it)

paulb