CodeSteps

Python, C, C++, C#, PowerShell, Android, Visual C++, Java ...

Android Studio : Run Project

I have explained the steps to create an Android Project in Android Studio, in my previous Article “Android Studio : Create Android Project “. We have successfully completed the Project creation & the build was Successful. Now through this Article “Android Studio – Run Project”, I will explain how to Run the Project, and also fix some issues (if any) encountered during the Run Project.

Before we Run the Project, we must have a device to Deploy our Program. For this, we have created a Virtual Device through my previous Article, “Android Studio : How to Create New Virtual Device? “. We will select this Virtual Device when we Run our Project.

Step 1. Open our Project (which was built through my previous Article), in Android Studio. Re-build the Project. The Project should be Successful. The next step is to Run the Project.

Step 2. Select Run menu and then select “Run ‘app’” menu item. Android Studio will start Running the Project.

Step 3. Android Studio will open the “Select Deployment Target” dialog, and lists a list of Available Virtual Devices to allow us to select the deployment Target for our Project.

The Virtual Device that we have created in our earlier Article, will display in the list.

Android Studio - Select Deployment Target
Android Studio – Select Deployment Target

Select the Virtual Device and click on the OK button.

Step 4. Android Emulator will be active and start emulating the Virtual Device and open the Project in the Virtual Device.

The Virtual Device will function as a normal Android Phone device. It allows us to test the functionality, whether working fine in the Virtual Device.

You may see the below driver issue; you can click OK to continue this for the moment; or update with the compatible driver.

—————————
GPU Driver Issue
—————————
Your GPU driver information:

GPU #1
Make: 8086
Model: Intel(R) HD Graphics Family
Device ID: 0a16

Some users have experienced emulator stability issues with this driver version. As a result, we’re selecting a compatibility renderer. Please check with your manufacturer to see if there is an updated driver available.
—————————
OK
—————————

Step 5. Notice that, it displays the “Hello, World!” message when we Run our Project; and it displays in the center of the device. Where in the Project do we mention “Hello, World!” text.? This is through the resource file, “activity_main.xml”, added in the Project.

Android Virtual Device - Pixel 2 - Startup Screen
Android Virtual Device – Pixel 2 – Startup Screen

You can view this resource file from app -> res -> layout -> activity_main.xml in Android view.

Once you open the “activity_main.xml” resource file, Android Studio will open a Designer window to allow you to modify the properties.

Android Studio - "activity_main.xml" resource
Android Studio – “activity_main.xml” resource

Step 6. Lets’ start using the Virtual Device. Use this as a normal device. Besides the device, there is a toolbar to control the operations in the device. Open the web browser & browse for “https://codesteps.com//” to verify whether the Internet is working on the device.

Android Virtual Device - Pixel 2
Android Virtual Device – Pixel 2

Once done, close the Device.

I will explain more about Android Programming in my next upcoming Articles.

Please post your comments in the below comments section.

[..] David

Android Studio : Run Project

2 thoughts on “Android Studio : Run Project

  1. What is the actual solution for GPU driver issue? I can not run AVD!. only device shows but android not start. I am looking that solution for Last 7 days . If I change graphics card, will it work? What is the effective solution??

    1. Driver issues can be resolved, only through installing the right drivers. You can contact the manufacturer for the right driver for the device. If it has some issues with the driver it automatically selects the compatible renderer.
      Other option is select the software emulation; which is bit slow compare to hardware emulation.

      [..] David

Leave a Reply

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

Scroll to top