You are previewing Android Studio 2 Essentials - Second Edition.
O'Reilly logo
Android Studio 2 Essentials - Second Edition

Book Description

A fast-paced guide to get you up and running with Android application development using Android Studio 2

About This Book

  • Configure, build, and run Android projects with Android Studio 2

  • Test your apps using the Android emulator and learn how to manage virtual devices

  • Explore how Android Studio 2 can be made a part of your workflow to reduce the overall development time

  • Who This Book Is For

    If you are an Android developer looking to quickly take advantage of Android Studio 2 and add it to your workflow, then this book is for you. It is assumed that you are familiar with the OOP paradigm and Java. You are recommended to have prior knowledge of the main characteristics of the Android mobile system to get the most out of this book.

    What You Will Learn

  • Install Android Studio on your system and configure the Android Software Development Kit

  • Create your first project and explore its structure

  • Manage a project in Android Studio 2 with Gradle

  • Improve your productivity while programming by getting the best of the code editor

  • Design the user interface using layouts and see how to handle various user events

  • Integrate Google Play services into your project efficiently

  • Monitor your app while it's running and constantly improve its performance

  • In Detail

    Android Studio 2, the official IDE for Android application development, dramatically improves your workflow by letting you quickly see changes running on your device or emulator. It gives developers a unique platform by making app builds and deployment faster.

    This book will get you up and running with all the essential features of Android Studio 2 to optimize your development workflow.

    Starting off with the basic installation and configuration of Android Studio 2, this book will help you build a new project by showing you how to create a custom launcher icon and guiding you to choose your project.

    You will then gain an insight into the additional tools provided in Android Studio, namely the Software Development Kit (SDK) Manager, Android Virtual Device (AVD) Manager, and Javadoc. You’ll also see how to integrate Google Play Services in an Android project.

    Finally, you’ll become familiar with the Help section in Android Studio, which will enable you to search for support you might require in different scenarios.

    Style and approach

    A comprehensive and practical guide that will give you the essential skills required to develop Android applications quickly using Android Studio. With the help of a real-world project, this book will show how to make Android Studio a part of your development process and optimize it.

    Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the code file.

    Table of Contents

    1. Android Studio 2 Essentials Second Edition
      1. Table of Contents
      2. Android Studio 2 Essentials Second Edition
      3. Credits
      4. About the Author
      5. About the Reviewer
      6. www.PacktPub.com
        1. eBooks, discount offers, and more
          1. Why subscribe?
      7. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Conventions
        5. Reader feedback
        6. Customer support
          1. Downloading the example code
          2. Downloading the color images of this book
          3. Errata
          4. Piracy
          5. Questions
      8. 1. Installing and Configuring Android Studio
        1. Preparing for installation
        2. Downloading Android Studio
        3. Installing Android Studio
        4. Running Android Studio for the first time
        5. Configuring the Android SDK
        6. Summary
      9. 2. Starting a Project
        1. Creating a new project
          1. Configuring the project
          2. Selecting the form factors
          3. Choosing the activity type
        2. Customizing your activity
        3. Summary
      10. 3. Navigating a Project
        1. The project navigation panel
        2. The project structure
          1. The resources folder
          2. The manifest file
          3. Gradle
        3. Project settings
        4. Summary
      11. 4. Using the Code Editor
        1. Customizing editor settings
          1. General
          2. Colors & Fonts
          3. Code Style
          4. File and Code Templates
        2. Code Completion
          1. Smart Type Completion
          2. Postfix Completion
        3. Code generation
        4. Navigating code
        5. Useful shortcuts
        6. Summary
      12. 5. Creating User Interfaces
        1. The graphical editor
        2. The text-based editor
        3. Creating a new layout
        4. Adding components
          1. Component's properties
        5. Supporting multiple screens
        6. Changing the UI theme
        7. Handling events
        8. Summary
      13. 6. Tools
        1. Software Development Kit Manager
        2. The AVD Manager
          1. The Android emulator
        3. Generating Javadoc
        4. Tasks and contexts
        5. Version control systems
        6. Summary
      14. 7. Google Play Services
        1. How Google Play services work
        2. Available services
        3. Adding Google Play services to Android Studio
        4. Google Maps Android API
        5. Google Places
          1. Geo Data API
          2. Place Detection API
        6. Google Sign-In
        7. Google+ Platform for Android
        8. Google Play In-App Billing
        9. Google Cloud Messaging
        10. More sample apps
        11. Summary
      15. 8. Debugging
        1. Running and debugging
          1. Console
          2. Debugger
          3. LogCat
          4. Monitors
        2. Instant run
        3. Android Device Monitor
          1. Threads
            1. Method profiling
          2. Heap
          3. Allocation Tracker
          4. Network Statistics
          5. File Explorer
          6. Emulator Control
          7. System Information
          8. Hierarchy View
        4. Summary
      16. 9. Preparing for Release
        1. Understanding an APK file
        2. Build types
        3. Steps prior to releasing your app
        4. Generating a signed APK
        5. Sign automatically in release mode
          1. Running your app in release mode
          2. APK Analyzer
        6. Summary
      17. A. Getting Help
        1. Getting help from Android Studio
        2. Android online documentation
        3. Updates
        4. Summary
      18. Index