Book Image

Mastering Android Studio 3

By : Kyle Mew
Book Image

Mastering Android Studio 3

By: Kyle Mew

Overview of this book

Android Studio is an Integrated Development Environment (IDE) designed for developing Android apps. As with most development processes, Android keeps resources and logic nicely separated, and so this book covers the management of imagery and other resources, and the development and testing tools provided by the IDE. After introducing the software, the book moves straight into UI development using the sophisticated, WYSIWYG layout editor and XML code to design and test complex interfaces for a wide variety of screen configurations. With activity design covered, the book continues to guide the reader through application logic development, exploring the latest APIs provided by the SDK. Each topic will be demonstrated by working code samples that can be run on a device or emulator. One of Android Studio's greatest features is the large number of third-party plugins available for it, and throughout the book we will be exploring the most useful of these, along with samples and libraries that can be found on GitHub. The final module of the book deals with the final stages of development: building and distribution. The book concludes by taking the reader through the registration and publication processes required by Google. By the time you have finished the book, you will be able to build faster, smoother, and error-free Android applications, in less time and with fewer complications than you ever thought possible.
Table of Contents (10 chapters)

Importing projects into Android Studio

Eclipse is, without question, one of the finest development tools around and, after 15 years, many of us have become very familiar with it. When it comes to developing for a variety of platforms, Eclipse is a fantastic tool but cannot compete with Android Studio when it comes to developing Android applications.

If you are migrating from Eclipse, you will more than likely have projects you have been working on that you wish to import into Studio. The following steps demonstrate how this is done:

  1. First ensure that your Eclipse ADT root directory contains both the src and res directories and the AndroidManifest.xml file.
  2. Make a note of any Eclipse third-party plugins you have used as you will need to install equivalents into Studio.
  3. Open Android Studio and select Import Project from the welcome screen or from File | New | Import Project.
  4. Select the folder that contains the manifest and prepare a destination folder, then follow the prompts to complete the import.

The import process makes a complete copy of the project, leaving the original untouched, meaning it can still be worked on in Eclipse if you wish. Unfortunately, it is not possible to import third-party plugins but a large and growing number of plugins are available for Studio, and it is more than likely that you will be able to find equivalents. These can be browsed from File | Settings | Plugins.

If you have several Eclipse projects in the same workspace, then you should import one as a project and the rest as modules.

We will look again at this process when we come to project configuration, but otherwise, from here on in, we will be assuming that all projects are begun in Android Studio.