Thursday, 26 May 2016

Installation of Android Studio

Installation:
Before we get started, you’ll need to ensure that you have installed JDK 6 or higher (JDK7 is required for Android 5.0 and higher) on your PC.
If the JDK doesn’t show up, or you have an older version and would like to upgrade with the following link         http://www.oracle.com/technetwork/java/javase/downloads/index.html
How to Install Android Studio on Windows
1.      Download and launch the .exe file to your PC from the Android Studio home page.  https://developer.android.com/sdk/index.html
2.      Follow the instructions on the setup wizard to install Android Studio.
3.      If asked to point to where Java is installed, you need to set an environment variable in order to direct the installer to the proper location. To do that, select Start menu > Computer > System Properties > Advanced System Properties. From there you’ll open the “Advanced” tab and click “Environment Variables.” Here you’ll add a new system variable titled JAVA_HOME that points to your JDK folder.

 

How to Set Up Android Studio on Mac OS X


1.      Download  the installer to your PC and launch the .dmg  file from the Android Studio home page.   http://developer.android.com/sdk/index.html
2.      Drag and drop the .dmg into your Applications folder.
3.      Open Android Studio and follow the instructions from the setup wizard.
If you get a warning saying that the file is damaged and should be moved to the trash, go to System Preferences > Security & Privacy and under the “Allow applications downloaded from” section select “Anywhere.” From here you can repeat Step 3 and install the program.

20.1 Hello world Project:

Create Android Application :




To create a new android project from android studio click Start a new Android Studio Project from Quick Start which will looks like below screenshot.

After clicking start a new android studio project, new widow will appear there which will look like below.


Here, you have to fill up application name, company domain, package name and choose project location. Just write Hello World Example Project in application name, viralandroid.com in company domain, com.viralandroid.helloworldexampleproject in package name and use default directory of project location and clickNext button.

Now, you will see the place to choose different android platforms and minimum SDK (minimum API level). Just check on Phone & Tablet and choose API 8: Android 2.2 (Froyo) in minimum SDK and click Next button. 



Then you will see add an activity to mobile window, just select Empty Activity and click Next button.

Then, you will see customize the activity window just use default activity name & Layout name and click Finish button.


After opening android studio, you will see like the screenshot given below.

And click the activity_main.xml tab. By default, android uses Hello World! In each new project, replace Hello World! with your name in the TextView like below.

To run your application, click Run icon from toolbar

A new window will appear there where you can choose running device or launch new emulator.Choose launch emulator and choose one of the virtual devices you have created before and click Ok button.

It takes few minutes to start your emulator for the first time.



Now, unlock your emulator screen to see your first application with your name which will look like below screenshot.




No comments:

Post a Comment

Ads Inside Post