The Sweat of Your Brow

When you create an Android project (e.g., via activitycreator), you supply the fully-qualified class name of the "main" activity for the application (e.g.,


You will then find that your project's src/ tree already has the namespace directory tree in place, plus a stub Activity subclass representing your main activity (e.g., src/com/commonsware/ android/ You are welcome to modify this file and add others to the src/ tree as needed to implement your application.

The first time you compile the project (e.g., via ant), out in the "main" activity's namespace directory, the Android build chain will create This contains a number of constants tied to the various resources you placed out in the res/ directory tree. You should not modify yourself, letting the Android tools handle it for you. You will see throughout many of the samples where we reference things in (e.g., referring to a layout's identifier via R.layout.main).

0 0

Post a comment