Книга: Beginning Android
The Sweat of Your Brow
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., com.commonsware.android.SomeDemo
). 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/SomeDemo.java
). 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 R.java
. This contains a number of constants tied to the various resources you placed out in the res/
directory tree. You should not modify R.java
yourself, letting the Android tools handle it for you. You will see throughout many of the samples where we reference things in R.java
(e.g., referring to a layout’s identifier via R.layout.main
).
- 4.4.4 The Dispatcher
- About the author
- Chapter 7. The state machine
- Chapter 12. Debugging your scripts
- Appendix E. Other resources and links
- Example NAT machine in theory
- The final stage of our NAT machine
- Compiling the user-land applications
- The conntrack entries
- Untracked connections and the raw table
- Basics of the iptables command
- Other debugging tools