Android Developer Tools Essentials: Android Studio to Zipalign

Android Developer Tools Essentials: Android Studio to Zipalign

Mike Wolfson, Donn Felker

Language: English

Pages: 250

ISBN: 1449328210

Format: PDF / Kindle (mobi) / ePub


Android development can be challenging, but through the effective use of Android Developer Tools (ADT), you can make the process easier and improve the quality of your code. This concise guide demonstrates how to build apps with ADT for a device family that features several screen sizes, different hardware capabilities, and a varying number of resources.

With examples in Windows, Linux, and Mac OS X, you’ll learn how to set up an Android development environment and use ADT with the Eclipse IDE. Also, contributor Donn Felker introduces Android Studio, a Google IDE that will eventually replace Eclipse.

  • Learn how to use Eclipse and ADT together to develop Android code
  • Create emulators of various sizes and configurations to test your code
  • Master Eclipse tools, or explore the new Android Studio
  • Use Logcat, Lint, and other ADT tools to test and debug your code
  • Simulate real-world events, including location, sensors, and telephony
  • Create dynamic and efficient UIs, using Graphical Layout tools
  • Monitor and optimize you application performance using DDMS, HierarchyViewer, and the Android Monitor tool
  • Use Wizards and shortcuts to generate code and image assets
  • Compile and package Android code with Ant and Gradle

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

This can be useful for saving the state of an emulator, allowing you to quickly boot to a specific state, avoiding lengthy boot times. For more informa‐ tion, see “Using the Emulator” on page 39. Skin Allows you to specify a particular screen size and resolution. It provides a set of standard screen configurations for a particular platform, or you can specify custom values. Creating AVDs from the command line It can be useful to generate AVD images from the command line when you are scripting or

dedicated memory). It is common for a developer to have many different emulator and physical devices running at the same time, then use each of them throughout the test cycle. It is worth noting that the emulator doesn’t support certain actions, such as simulating ac‐ celerometer activity, or simulating some sensor activity (such as the magnetometer). 39 You should review the “Capabilities and Limitations” on page 25 discussion to determine whether the emulator suits your needs. Starting the

Key Effect Home Android Home F2 Menu Esc Back Ctrl-F11 (Cmd-F11 on Mac) Rotate landscape/portrait Keypad 4/6/5/8/2 D-Pad: left/right/center/up/down Ctrl-F8 Toggle Cell Network On/Off File Explorer ADT provides a GUI tool that makes exploring and interacting with the files on the device very easy. It allows you to navigate the file system to discover which files are on the device, move files onto and off the device, and modify the file system by adding and rearranging folder locations.

Module/ Library/Java Library You can easily add a new Android Module, Android Library, or Java Library to your application by simply choosing the File → New Module or File → Import Module file option and following the wizard through the process. Preferences At times, you may want to customize Android Studio. You can do this by accessing the Preferences through the Android Studio → Preferences menu. Some options you can edit are the theme of the IDE, font sizes, keymap, toolbars, and many other

and samples that are required to run and develop Android apps and to use the tools. It is not a complete development environment, and contains only the base tools needed to download the rest of the necessary components. Downloading tools and components will be discussed in detail in the section about using the “SDK Manager” on page 11. In order to get started, you will need to download the “ADT Bundle.” This is a new packaging style (as of ADT version 21) that includes all the components required

Download sample

Download