Tuesday, January 26, 2016

Android Studio- Running and Debugging an Emulator

So far, we have finished downloading Android Studio.  Even if you don't have an Android phone, Studio comes with an emulator, or a virtual phone that simulates your apps.  Open Studio and you should see this screen:

Click the top tab, "Start a new Android Studio Project."  You can pick any app name you like on the next screen.  Click next again to choose which version of Android you can program for.  Leave this as default and click next again.  You should see a screen of android phones.  Select the tab that says "blank activity" and click next. Leave the next screen values as default an finish!

Creating a new Studio project takes a couple of minutes to load, after which you will see a page like the following:

If you have a Windows computer, the phone in the center will be blank, and if you have a map, the phone will have a circle-shaped button at the bottom.

Near the top of your screen, you will see an icon of the Android robot with a blue down arrow in front of it.  (center icon in picture).


This is your SDK Manager.  Open the button to see the following screen:

 You will see several folders named "Android 5.1.1 (API 22)", "Android 5.0.1 (API 21)", etc.  Look at the drop down menu and make sure that at least 1 folder has the files installed that the above picture has (preferably the API 21 or API 22).  Once you are done, close the SDK Manager.


Now, at the top center of the screen, you'll see a green arrow button.  Click this button to run your app.  A screen will appear prompting you to choose a device.  Select "launch emulator" and click the "..." button at the right side of the popup.

A new popup will appear asking to create a virtual device (emulator).  At the bottom left of the screen, click "create virtual device".  A screen will appear like below:

 On the category pane, select phone.  On the main pane, select any phone device you like (preferably one of the top options.  Click Next, and you will see a page titled "system image".  Select an option with black colored text.  If none of them are colored black and ask for a download, download the release with API Level equal or less than to the API Level you downloaded in the SDK Manager.

Click next and then Finish to complete creating your emulator.  Now, try running your app and select the emulator you just built.  In a couple of minutes, a popup screen of a phone will appear and will display your app!






Saturday, January 23, 2016

Installing Android Studio- Mac


Android Studio is the industry-standard software for developing Android Apps.  In this tutorial, we will download Studio and other necessary software for creating your own apps.


 
1. Verify That You Have Java
Your first step is to check if you have Java already installed (must be version 7+).  Open your command terminal, or cmd, and type “java –version” and enter.
The example below shows Java version 8.0_05 (version number is after the “1.”)

If you have Java 7 or higher, go to step 3!
Otherwise, continue to step 2.



2. Download the Java Development Kit
Download the Java Development Kit here:
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

Go to the first Java SE Development Kit block as shown in the picture below (Kit number may be different). Download the Mac JDK (highlighted in picture).  Locate the file after downloading, and double click it to begin the installation process.

Once the JDK has finished downloading, go back to Step 1 and confirm that you have Java version 7 or higher installed.



3. Installing Android Studio
Go to the url below and download Android Studio, after accepting the terms and conditions.
https://developer.android.com/sdk/index.html 

Double-click the file you downloaded and follow the prompts. Drag the Android Studio icon into your Applications folder.



4. Setup Wizard
The setup wizard will setup Android Studio for you.

Choose Standard Setup and accept all the licenses.


When you are finished, you will see the window above.

Good Job!  You finished Installing Android Studio!




Installing Android Studio- Windows


Android Studio is the industry-standard software for developing Android Apps.  In this tutorial, we will download Studio and other necessary software for creating your own apps.

 

1. Check if you have Java Installed.
Your first step is to check if you have Java already installed (must be version 7+).  Open your command terminal, or cmd, and type “java –version” and enter.
The example below shows Java version 8.0_05 (version number is after the “1.”

If you have Java 7 or higher, go to Step 3.
Otherwise, continue to step 2.



2. Download the Java Development Kit (JDK)
Download the Java Development Kit from:
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

Go to the first Java SE Development Kit block as shown in the picture below (Kit number may be different). Download the Windows JDK (highlighted in picture) after accepting the agreement.
Once you've downloaded the JDK, double click to install.
Go back to Step 1 and confirm that you have Java version 7 or higher installed.



3. Installing Android Studio
Go to the url below and download Android Studio.
https://developer.android.com/sdk/index.html

Accept the terms and conditions to start the download. Double-click the downloaded file and follow all the prompts. Open the downloaded file, and follow the Android Studio Setup Wizard. Accept the defaults configuration for all steps.

When you reach this screen, make sure that all components are selected.



4. Setup Wizard
After finishing the install, the Studio will download and install some additional components.This will take a few minutes.




When you are finished, you will see the window above.

Good Job!  You finished Installing Android Studio!