Because mobile application are going so viral everywhere, I figured I better learn something quick. So, my journey starts with going to the Android Developers site http://developer.android.com/index.html and downloading the Android SDK.
Reading through the download information, I see the use of Eclipse the associated plug-in, great! I follow the instructions and go to build the Hello world example. I am now getting the following error:
2010-11-16 13:40:23 - HelloAndroid] ERROR: Unable to open class file D:\Galileo\workspace\HelloAndroid\gen\com\example\helloandroid\R.java: No such file or directory
This same issue has bugged me about the Eclipse Android plugin. The is generated, but if it doesn't already exist then the build complains. Thge way I get around it is right-click the "gen" folder and create a new class, giving the appropriate package name ("com.example.helloandroid" in your case) and as the class name. Once the class is created, you should be able to build without errors. (Note that you do not have to, and should not, edit the file.)
Sorry for the formatting, but the forum prevents me from using that letter by itself.
I've had similar such behaviour in Eclipse. Sometimes eclipse may complain that your project "has errors" and can't compile, yet the source code can be ok.
Best solution I've found, is to "clean" the project. I can't remember where that option is (not in front of an IDE) but somewhere along the top you can go Projects > Clean, I believe
Every time I create a project, this problem happens to me. I think it's nomal. For Eclipse read R.java before the IDE had generated it, it would happen.
[I found a silly work around to this issue. Go up to File -> Restart and then run the build and run the project. It works.
I just tried this and it didn't work for me. Here are the step I took:
1) Create a new Android project
2) File | Restart
3) Right-click project and select Build.
Still got the error:
Hi all,
I've just downloaded Eclipse and installed the Android SDK.
When I try to run the Hello World, I get the following error message
[2010-12-11 13:06:38 - Tutoriel] /Tutoriel/gen already exists but is not a source folder. Convert to a source folder or rename it.
[2010-12-11 13:08:57 - Tutoriel] /Tutoriel/gen already exists but is not a source folder. Convert to a source folder or rename it.
[2010-12-11 13:09:06 - Tutoriel] /Tutoriel/gen already exists but is not a source folder. Convert to a source folder or rename it.
I don't know what to do with this?
I've tried a couple of things but it seems the gen folder is always in the way when trying to run the app.
What am I not understanding here?
Lars Vogel
Ranch Hand
Joined: Oct 10, 2007
Posts: 55
posted
0
Did you try the solultions from the link I posted?