Search code examples
androideclipseandroid-sdk-tools

New Android Project not creating Layout or Java file


I have been trying, for 2 days now, to simply get past the first few pages of the first chapter of Big Nerd Ranch's Android Programming Book.

The gist of my problem is that when I create a new Android app, no layout or .java files are created.

I have installed the ADT Bundle (which includes Eclipse and the SDK) from the Android dev site. I have also installed Eclipse on my own, updated Java on my Mac, and manually downloaded the SDK. In both scenarios I am running ADT version 23.0.

Here are some screenshots of what I'm doing:

Creating the project enter image description here

The Project workspace right after creating: enter image description here

The Installed ADT Tools enter image description here

The installed SDKs and API Levels enter image description here

I also read on the dev forums that there are some issues with version 23.0, and that things like ProGuard, SQLite3, and other items are missing, which I have copied into the Android SDK folder where everything is located.

And yet, it doesn't work. No matter what API Level I target, I cannot get the layout and java file to create. Any ideas and solutions? I know there is Android studio but I really want to learn it with Eclipse for legacy support, and as this is what most books use for teaching. Plus, there is no support for the NDK yet, from what I have read, which is also of interest to me.


Solution

  • OK, So after several hours of experimentation and research, there is currently no way to create a default Android project with the Rev 23.0 version of the ADT Tools.

    Here is what I did form scratch to get things working on my computer. I'm running OS X 10.9.3:

    1. Downloaded the Java JDK 7u60 from here: Java JDK for Mac
    2. Downloaded Eclipse Luna 64-bit from here: Eclipse Luna 64-Bit Mac
    3. Downloaded the Android SDK version 22.6.3 here: Android SDK 22.6.2 Mac
    4. Downloaded the ADT tools version 22.6.3 from here: ADT 22.6.3 Mac

      • I first put the Android SDK folder, unzipped, in my Applications directory and renamed it to "Android SDK" (You can use whatever you want or put it elsewhere.
      • Afterwards, I went into Eclipse > Help > Install New Software...
      • Then I clicked on Add > Archive > .Zip file for ADT 22.6.3
      • Launched Eclipse and was promoted to select the SDK location, so in Eclipse's preferences I selected the folder I put inside my Applications directory.
      • Updated the Android SDK built tools and downloaded the SDKs for the API levels I wanted. Note that I did NOT update the Android SDK Tools to the Rev 23 update available. This is what's broken and has things like ProGuard, SQLite, and other items missing (it's because it was released earlier this week for the L Preview).

    And that's it, I am now able to create an application and the .java and activity files are there.

    As mentioned by Mr. Kro, there are differences between the book and the SDK, but this is to be expected after ~1 year since its release. In any case this is going to help you if you are having the same trouble as I am. And with this you can use the latest Eclipse and the latest stable Android SDK/ADT, until Google patches Rev 23.