Copy this link when reproducing:
From today on, I'll develop an Android application named "Personal Expense Book". As its name implies, its main function is to track the personal expenses. As a start, I need to set up the development environment. It is quite easy to do this. Let's take it easy and enjoy a few beautiful photos of Claudia Wong first.
1. Download and install Android Studio. Please see the link http://www.casperlee.com/en/l/blog/195 for detail.
2. Run Android Studio.
3. Select "Start a new Android Studio project".
4. Type in "Application name" and "Company Domain", it will automatically create a "Package name". Choose "Project location" and click "Next" to continue.
5. Tick "Phone and Tablet", select a "Minimum SDK" which the application requires, and click "Next" to continue.
6. Select "Empty Activity" and click "Next" to continue.
7. Type in "Activity Name" and "Layout Name", Tick "Generate Layout File" and "Backwards Compatibility (AppCompat)", and Click "Finish". Android Studio will create an Android application, which has a structure as shown below.
8. Select "Run -> Run 'app'" from the main menu, it will ask for a "Deployment Target" as shown below.
9. There are 2 kinds of "Deployment Target": connected devices and virtual devices.
To use a connected device, it may requires the following steps:
I. Connect the cell phone or the tablet to the computer using a USB wire.
II. Install the USB driver for the phone or the tablet.
III. Activate the "USB debugging" option in the "Developer options" of the cell phone or the tablet.
To use a virtual device, it may requires the following steps:
I. Click "Create New Virtual Device"
II. Follow the instructions to create a new virtual device.
Here, I'll select my cell phone "HUAWEI STF-AL00", and click "OK" to continue.
10. After a while, in my cell phone, I can see the application has been installed, and it works properly: