Log in or register to post comments

on MAC OS unable to open R.java

October 18, 2010 - 3:48am #1

Hey guys,

I'm getting this error upon importing the ImageTargets project in to Eclipse:

ERROR: Unable to open class file /Users/kedarreddy/Development/Android/qcar-sdk-0-9-7/samples/ImageTargets/gen/com/qualcomm/QCARSamples/ImageTargets/R.java: No such file or directory

any ideas?
thanks
kedar

Re: on MAC OS unable to open R.java

October 18, 2010 - 5:58am #2

R.java is an automatically generated file that ends up in the project's gen folder. Sometimes, the file isn't ready when the build looks for it. The easiest fix is to clean and rebuild the project. Go to Project > Clean > "Clean projects selected below" and choose the ImageTargets project.

It can also help to turn off automatic builds and force build the project yourself. Uncheck the Project > Build Automatically flag, and then right-click on the ImageTargets project in the Package Explorer. There will now be a Build Project option in the list; build the project a couple times in a row and the R.java file should be ready.

- Kim

Log in or register to post comments