Android BLOG

About Android Studio

 

 

Android Studio is the official Integrated Development Environment (IDE) for Android app development, based on IntelliJ IDEA . On top of IntelliJ's powerful code editor and developer tools, Android Studio offers even more features that enhance your productivity when building Android apps, such as:

  • A flexible Gradle-based build system
  • A fast and feature-rich emulator
  • A unified environment where you can develop for all Android devices
  • Instant Run to push changes to your running app without building a new APK
  • Code templates and GitHub integration to help you build common app features and import sample code
  • Extensive testing tools and frameworks
  • Lint tools to catch performance, usability, version compatibility, and other problems
  • C++ and NDK support
  • Built-in support for Google Cloud Platform, making it easy to integrate Google Cloud Messaging and App Engine
  • Download Android Studio from here -> Android Studio

System Requirements

WINDOWS MAC LINUX
  • Microsoft® Windows® 7/8/10 (32- or 64-bit)
  • 3 GB RAM minimum, 8 GB RAM recommended; plus 1 GB for the Android Emulator
  • 2 GB of available disk space minimum,
    4 GB Recommended (500 MB for IDE + 1.5 GB for Android SDK and emulator system image)
  • 1280 x 800 minimum screen resolution
  • For accelerated emulator: Intel® processor with support for Intel® VT-x, Intel® EM64T (Intel® 64), and Execute Disable (XD) Bit functionality
  • Mac® OS X® 10.10 (Yosemite) or      higher, up to 10.12 (macOS Sierra)
  • 3 GB RAM minimum, 8 GB RAM recommended; plus 1 GB for the Android Emulator
  • 2 GB of available disk space minimum,
    4 GB Recommended (500 MB for IDE + 1.5 GB for Android SDK and emulator system image)
  • 1280 x 800 minimum screen resolution
  • GNOME or KDE desktopTested on Ubuntu® 14.04 LTS, Trusty Tahr (64-bit distribution capable of running 32-bit applications)
  • 64-bit distribution capable of running 32-bit applications
  • GNU C Library (glibc) 2.19 or later
  • 3 GB RAM minimum, 8 GB RAM recommended; plus 1 GB for the Android Emulator
  • 2 GB of available disk space minimum,
    4 GB Recommended (500 MB for IDE + 1.5 GB for Android SDK and emulator system image)
  • 1280 x 800 minimum screen resolution
  • For accelerated emulator: Intel® processor with support for Intel® VT-x, Intel® EM64T (Intel® 64), and Execute Disable (XD) Bit functionality, or AMD processor with support for AMD Virtualization™ (AMD-V™)

Install Android Studio

Setting up Android Studio takes just a few clicks. (You should have already downloaded Android Studio.)

To install Android Studio on Windows, proceed as follows:

  1. Launch the .exe file you downloaded.
  2. Follow the setup wizard to install Android Studio and any necessary SDK tools.

That's it! The following screens shows each step of the recommended setup procedure.

I launched .exe to start the installation process. The installer responded by presenting the Android Studio Setup dialog box shown in Figure 1.

The installer presents the Android Studio Setup dialog box.

Figure 1. Set up Android Studio

Clicking Next took me to the following dialog box, which gives you the option to decline installing the Android SDK (included with the installer) and an Android Virtual Device (AVD).

androidstudiop1 fig2

Figure 2. Do you want to install the Android SDK and AVD?

I chose to keep the default settings. After clicking Next, you'll be taken to the license agreement dialog box. Accept the license to continue the installation.

Accept the license agreement to continue installation.

Figure 3. Accept the license agreement to continue installation

The next dialog box invites you to change the installation locations for Android Studio and the Android SDK.

Set the Android Studio and Android SDK installation locations.

Figure 4. Set the Android Studio and Android SDK installation locations 

Change the location or accept the default locations and click Next.

The installer defaults to creating a shortcut for launching this program, or you can choose to decline. I recommend that you create the shortcut, then click the Install button to begin installation.

Let the installer create a new shortcut for Android Studio or cancel shortcut creation.

Figure 5. Create a new shortcut for Android Studio 

The resulting dialog box shows the progress of installing Android Studio and the Android SDK. Clicking the Show Details button will let you view detailed information about the installation progress.

The dialog box will inform you when installation has finished. When you click Next, you should see the following:

androidstudiop1 fig6

Figure 6. Leave the Start Android Studio check box checked to run this software

To complete your installation, leave the Start Android Studio box checked and click Finish.

 

Running Android Studio

Android Studio presents a splash screen when it starts running:

androidstudiop1 fig7

Figure 7. Android Studio's start screen

On your first run, you'll be asked to respond to several configuration-oriented dialog boxes. The first dialog box focuses on importing settings from any previously installed version of Android Studio.

Import settings from a previously installed version of Android Studio or keep the default setting.

Figure 8. Import settings

If you're like me, and don't have a previously installed version, you can just keep the default setting and click OK. Android Studio will respond with a slightly enhanced version of the splash screen, followed by the Android Studio Setup Wizard dialog box:

androidstudiop1 fig9

Figure 9. Validate your Android SDK and development environment setup

When you click Next, the setup wizard invites you to select an installation type for your SDK components. For now I recommend you keep the default standard setting.

androidstudiop1 fig10

Figure 10. Choose an installation type

Click Next and verify your settings, then click Finish to continue.

Review various settings before installation of SDK components.

Figure 11. Review settings

The wizard will download and unzip various components. Click Show Details if you want to see more information about the archives being downloaded and their contents.

androidstudiop1 fig12

Figure 12. The wizard downloads and unzips Android Studio components

Finally, click Finish to complete the wizard. You should see the Welcome to Android Studio dialog box:

Create a new Android Studio project, work with an existing Android Studio project, and more.

Figure 14. Welcome to Android Studio 

You'll use this dialog to start up a new Android Studio project, work with an existing project, and more. You can access it anytime by double-clicking the Android Studio shortcut on your desktop.

Starting a new project

From our setup so far, you should still have Android Studio running with the Welcome to Android Studio dialog box. From here, click Start a new Android Studio project. Android Studio will respond with the Create New Project dialog box shown in Figure 15.

 

Figure 15. Create a new project

Enter your own application name as the application name and your company name as the company domain name. You should then see

Even you can change the project location.   Click Next to select your target devices.

androidstudiop1 fig16

Figure 16. Select your target device categories

Android Studio lets you select form factors, or categories of target devices, for every app you create. I would have preferred to keep the default API 15: Android 4.0.3 (IceCreamSandwich) minimum SDK setting (under Phone and Tablet), which is supported by my Amazon Kindle Fire HD tablet. Because Android Studio doesn't currently support this API level (even when you add the 4.0.3 system image via the SDK Manager), I changed this setting to API 14: Android 4.0 (IceCreamSandwich), which is also supported by my tablet.

Click Next, and you will be given the opportunity to choose a template for your app's main activity. For now we'll stick with Empty Activity. Select this template and click Next.

androidstudiop1 fig17

Figure 17. Specify an activity template

Next you'll customize the activity:

Choose the activity name and, if a layout file is to be generated, the name of the layout.

Figure 18. Customize your activity

Enter MainActivity is the activity name and activity_main as the layout name, and click Finish to complete this step. Android Studio will respond that it is creating the project, then take you to the project workspace.

The project workspace is organized around a menu bar, a tool bar, a work area, additional components that lead to more windows (such as a Gradle Console window), and a status bar. Also note the Tip of the Day dialog box, which you can disable if you like

When you enter the project workspace, MyApplication is identified as the current project, but you won't immediately see the project details. After a few moments, these details will appear in two new windows.

 Figure 19. The project and editor windows

The project window is organized into a tree whose main branches are App and Gradle Scripts. The App branch is further organized into manifests, java, and res subbranches:

  • manifests stores AndroidManifest.xml, which is an XML file that describes the structure of an Android app. This file also records permission settings (where applicable) and other details about the app.
  • java stores an app's Java source files according to a package hierarchy, which is ca.javajeff.w2a in this example.
  • res stores an app's resource files, which are organized into drawable, layout, mipmap, and values subbranches:
    • drawable: an initially empty location in which to store an app's artwork
    • layout: a location containing an app's layout files; initially, main.xml(the main activity's layout file) is stored here
    • mipmap: a location containing various ic_launcher.png files that store launcher screen icons of different resolutions
    • values: a location containing colors.xml, dimens.xml, strings.xml, and styles.xml

The Gradle Scripts branch identifies various .gradle (such as build.gradle) and .properties (such as local.properties) files that are used by the Gradle-based build system.

5 thoughts on “Android BLOG

Leave a Reply to Riya Cancel reply

Your email address will not be published. Required fields are marked *