• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Eclipse, ADT, and no R.java

Hello,

I am new to Android development and am having some problems with the SDK and making it play nice with Eclipse.

The problem: Eclipse is not auto-generating R.java, even for an empty project with nothing changed. It also does not appear to see the tool chain (most likely the cause).

What I have done:
I followed the installation guide for the SDK and ADT with Eclipse 3.4. I have set my path variable, pointed Eclipse at the SDK, and generally played with every relevant setting I could find. Finally got fed up with it and just downloaded the latest Eclipse (3.5.1) and reinstalled ADT, to no avail.

Relevant information:

Windows XP SP2
SDK V.2 (downloaded two days ago)
Eclipse 3.5.1 (downloaded today)
JRE 6 SE

I apologize in advance if this has already been answered but every search I have tried has turned up this error being due to xml misconfiguration or the like. I get my error even on an untouched project created using the wizard. I have a build log from an empty project available, if that would help. Thanks in advance.

-cheers
 
Did you update / install packages within the SDK / AVD manager application after installing the sdk?

In Eclipse, Window > Android SDK and AVD Manager

You can also run it from the SDK_root_folder\tools folder. The program is named "android". On windows, this is "SDK Setup.exe" in the root of the SDK directory.

Once it opens, under the left window pane select "Installed Packages", and see what you have installed. If its empty or doesn't show installed platforms and api's you'll need to install them from the "Available Packages" option on the left window pane.

Android SDK | Android Developers << starting at #3 for installing platforms into the SDK.

This is what it would normally look like under the "Installed Packages" with a working setup.
 

Attachments

  • avd-installed.jpg
    avd-installed.jpg
    19.2 KB · Views: 166
Thanks for responding. I currently have the APIs for 1.1, 1.5, 1.6, and 2.0 as well as the SDK tools and the documentation. Been through the Android setup guide and followed it to a T. It looks like the tools paths are correct as any attempt to build gets me output from the aapt tool (which gives me the wonderfully descriptive error "'aapt' error. Pre Compiler Build aborted."). I managed to get it working for some projects (don't ask me, I have no idea what I did) while others still refuse to compile. Is it possible that I am having problems with the workspace? I noticed that when I reinstalled Eclipse that a lot of the data fields were filled in and my AVDs were still hanging around. Thanks again for the help.

-cheers
 
The SDK & AVD's are separate from eclipse. Wiping eclipse and re-installing won't touch the avd's. You don't actually need eclipse to do this. Ant, JDK and the Android SDK is enough :)

I would suggest trying "Fix Project Properties" when you right click the project in the package explorer and under the "Android Tools" menu option, for any project your having trouble with.
 
Sweet, handy little option to know about. Thanks for the help and the info. I looks like everything is working the way it should be.

-cheers
 
Back
Top Bottom