Skip to main content

Launching Your First Android Application

With all tools and the SDK downloaded and installed , it is now time to start your engine.As in most programming blog, the first example uses the ubiquitous Hello World application. This will give you a detailed look at various components that make up an Android project. This is also the easiest Android project you will ever make.

Believe it or not , the Hello Wold Application is already finished. By default , when you create a new application in Android Studio , it creates a Hello World application. Let's launch this application and , in the process , also launch the Android emulator to see how everything works.

1. Select Run -> Run app from the Android Studio menu bar. You should see the Select Deployment Target dialog as shown.


2. Select the Nexus 5X API 25 ( feel free to select the Nexus 5x API 25 , which is the Jelly Bean emulator that you created in the Try It Out for the last section),and click Next.

NOTE :- note that if there's ever a time when you have not already created the emulator, you can create an emulator at this point.

3. It can up to five minutes , and sometimes longer(depending on the hardware specs of your desktop) for the emulator to start and fully load. During this time (the first time you launch the emulator) the application might time out. If a message pops up in Android Studio telling you that application timed out waiting for the ADB(Android Debugging Bridge) to start , or another similar message , just wait for the emulator to fully load , and then once again select Run -> Run app from the Android Studio bar.

With the emulator fully loaded and started , Android Studio can install your Hello World application. The application will display as shown 

 This was a very example for how to create and launch your first Android applications. However, what this example has really done for is introduce you, on a general scale , to most of the major skills you will fine tune throughout this blog.

Comments

Popular posts from this blog

What is Android

Android is a moblie operating System that is based on a modified version of Linux. It was originally developed by a startup of the same name , Android , Inc. In 2005 , as part of its strategy to enter the moblie space , Google purchased Android , Inc. and took over its development work (as well as its development team). Google wanted the Android OS to be open and free , so most of the Android code was released under the open source Apache License. That means anyone who wants to use Android can do so by downloading the full Android source code. Moreover, vendors ( typically hardware manufacturers ) can add their own proprietary extensions to Android and customize Android to differentiate their products from others . This development model makes Android very attractive to vendors, especially those companies affected by the phenomenon of Apple's iPhone,which was a hugely successful product that revolutionized the smartphone industry. When the iPhone was launched , many smartphone m...

Android Studio

The first and most important piece of software you need to download is Android Studio. After you have downloaded and installed Android Studio , you can use the SDK Manager to download and install multiple versions of the Android SDK. Having multiple version of the SDK available enables you to write programs that target different devices. For example , you can write one version of an application that specifically targets Android Nougat , but because that flavor Android is on less than 1% of devices, with multiple versions of the SDK you can also write a version of your app that uses older features and targets Marshmallow or Lollipop users. You can use Android Device Manager to set up device emulators. You can Download Android Studio from https://developer.android.com/studio Android Studio is packaged in an executable. Run the install process to set up Android Studio. After you've download and run the setup executable, use the following steps to go through the installation proce...

Using Code Completion

Code completion is an invaluable tool that shows you contextual options for completing the piece of code that you are trying to write. For example, in the editor tab for the MainActivity.js file, locate the line that reads.          setContentView(R.layout.activity_main); Place your cursor after this line and press the Enter Key . On the new line , type the letter R , and then type a period, as shown here:          R. Android Studio Code Completion should display a list of values that you could use to try to complete the code statement. Figure shows what this list might look like . this is important if you are not entirely sure of the spelling of a method call or how to identify the different method signatures. NOTE if the code completion window does not open , press Ctrl + Space to force it to open. This is the same key combination used in some other IDEs for their versions of the code complet...