About Venkata Kiran

Kiran is a product developer working in medical domain. He worked on creating scalable java batch applications and is currently working on developing cross platform mobile applications. His current interests include automated testing of mobile applications.

Installing Android Studio and creating a new Android project on Android Studio

Android Studio IDE is launched at Google I/O 2013. Android Studio is based on  Intellij IDEA which aims to replace Eclipse + Android Developer Tools for Android development. And since Google itself is pushing it, it may catch up with eclipse soon.

Android has its pros and cons compared to eclipse.

+ Android Studio has better support for UI design and coding which comes handy when supporting devices of multiple resolutions.

+ Android Studio also has built in ProGuard and app-signing capabilities.

- As of now Android Studio cannot manage multiple projects in the same window. It opens a separate window for every project. I guess this is from Intellij IDEA and may not change soon.

- Gradle-based build support, but for users migrating from Eclipse this will be a learning curve.

Assuming Android SDK is already installed on your system,Download the latest version of Android Studio from Android Developer site. If not download the Android SDK.

http://developer.android.com/sdk/installing/studio.html

as1

Launch the downloaded EXE file, android-studio-bundle-<version>.exe.

Follow the set up wizard instructions to complete the installation.

as2

If JDK is not installed on your system, you will need to install latest version of Java also. Also you will need to set the system variables JDK_HOME and JAVA_HOME.

as3

Choose whether you want to limit the installation for only your profile or all the users using the system.

as4

Select the installation location.

as5

as6

as7

as8
Once the installation is completed, launch the IDE by clicking on the Android Studio from Programs.

Android Studio will launch displaying the below splash screen. It will take few seconds to launch the IDE.

as9

Some times the Android Studio(mostly on older versions) may fail to launch displaying the following error.

as10

To work around this issue, launch the Android Studio as Administrator.

In Android home screen, Select Configure –> Project Defaults –> Project Structure — Android SDK and configure the paths to your JDK and Android SDK.

as11

In the Android Studio home screen, click on ‘New Project’.

as12

Once you click on ‘New Project’, Android Studio will display the below screen for you to provide your application name, module name and package name. Also you can specify the Target SDK, Minimum required SDK, and the Android SDK version with which the application needs to be compiled with. And you specify one of the Android Studio’s built in themes.

as13

Next you will need to select the icons that will be displayed when the app is installed on devices. For now, let us leave them as it is and continue by clicking on Next.

as14

Then you need to select which type of activity that needs to be created. Select the activity and click on Next. If you don’t know which activity to choose, leave the Blank Activity as it is.

as15

Change the activity names with your preferred activity names and click on Finish.

as16

It will take some time to set up the project first time, since IDE will download several dependencies for gradle and indexing the project etc.

as17

Click on the Run button from the IDE, to start running the project.
as18

Then IDE will prompt you to select a device or emulator from the available list of devices or emulators configured on the system.

as19

Here I have a android emulator android_2_3_3 configured on my system and I select that Android Virtual device and click on Ok.

It will take painfully long time to launch the emulator, if it is not launched earlier. It is recommended to start the emulator manually and choose that emulator from ‘Choose a running device’ option.

The HelloWorld application we created will be installed into the emulator/device and will be launched.

as21

 

Related Whitepaper:

Rapid Android Development: Build Rich, Sensor-Based Applications with Processing

Create mobile apps for Android phones and tablets faster and more easily than you ever imagined

Use 'Processing', the free, award-winning, graphics-savvy language and development environment, to work with the touchscreens, hardware sensors, cameras, network transceivers, and other devices and software in the latest Android phones and tablets.

Get it Now!  

One Response to "Installing Android Studio and creating a new Android project on Android Studio"

  1. Jack Pryne says:

    Thanks for the pointers! I’m a JS coder, but new to Java & Android dev. What would make this tutorial better is linked definitions to some of the new terminology, i.e. ‘module name’ and ‘package name’, & maybe a bit more info on some of the other new terms too.

Leave a Reply


× 4 = thirty two



Java Code Geeks and all content copyright © 2010-2014, Exelixis Media Ltd | Terms of Use
All trademarks and registered trademarks appearing on Java Code Geeks are the property of their respective owners.
Java is a trademark or registered trademark of Oracle Corporation in the United States and other countries.
Java Code Geeks is not connected to Oracle Corporation and is not sponsored by Oracle Corporation.

Sign up for our Newsletter

15,153 insiders are already enjoying weekly updates and complimentary whitepapers! Join them now to gain exclusive access to the latest news in the Java world, as well as insights about Android, Scala, Groovy and other related technologies.

As an extra bonus, by joining you will get our brand new e-books, published by Java Code Geeks and their JCG partners for your reading pleasure! Enter your info and stay on top of things,

  • Fresh trends
  • Cases and examples
  • Research and insights
  • Two complimentary e-books