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
I had this kind of "bug" the first time I used Eclipse ADT too. In my case uninstall and reinstalling fixed the problem.
However as the comments told you, it's no big deal to have the files created automatically for you, except in the case you're totally new to Android and doesn't know what you may miss if you create the file from scratch.. which was also my case.
But in case you are still bugged by the problem then this might help. Usually these 3 files are created automatically for you, but in case they would not, then make them on your own by copy-pasting these:
AppNameHere\res\layout\activity_main.xml
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.anything.appnamehere.MainActivity"
tools:ignore="MergeRootFrame" />
AppNameHere\res\layout\fragment_main.xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.anything.appnamehere.MainActivity$PlaceholderFragment" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hello_world" />
</RelativeLayout>
AppNameHere\src\com.anything.appnamehere\MainActivity.java
package com.anything.appnamehere;
public class MainActivity extends Activity{
}
These codes are for my app which is named com.anything.appnamehere
, please modify to suit your need.
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:
Downloaded the ADT tools version 22.6.3 from here: ADT 22.6.3 Mac
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.