Once the AVD is running and fully booted into Android you can run your app. Running the app is just a matter of clicking the green triangle icon or using the menu command Run,Run. Android Studio first compiles your code and gets it ready to execute - You might see error messages at this sage if there is anything wrong with the code.
Next you will be asked to select which AVD or real device you want to run the program on. You can have multiple emulated devices and real devices connected and pick which one to test on each time you run. In our case there should only be one AVD running.
If you look at the Run window at the bottom of the Android Studio main Window you will see a succession of status messages indicating the progress of loading the app - from Waiting for device though uploading file to Success.
You app will appear on the emulator and run. In our case this isn't particularly impressive - just the words Hello Android World - but when you think of the journey travel it really should impress.
From this point you can now modify the code or the layout and run the app again to see the effects of the changes. You still have a lot to discover about how to extend the app and make it useful but - the adventure has begun.
Android Studio makes creating Android apps a lot easier than other approaches.
An app has at least one Activity and this defines a screen layout and a behavior.
The screen layout is controlled by an XML markup file, Main_Activity.xml in our case stored in the res directory.
Android Studio provides a drag-and-drop designer that allows you to create a UI without having to work directly with the XML.
The behavior of the app is controlled by a Java file, MainActivity.java in our case stored in the java directory. You can edit the code in the Java file directly in Android Studio.
To run an app you need either an emulator based AVD or a real Android device connected to the machine.
You need to create at least one AVD and start it running before trying to test your app.
When you run the app you can select which AVD or which hardware device is used to test it.
You can modify and re-run your app without having to restart the AVD or any real hardware connected to the machine.