Programming     Travel Logs     Life Is Good     Surfing Online     About Me
Set and enforce an aspirational personal hourly rate. If fixing a problem will save less than your hourly rate, ignore it. If outsourcing a task will cost less than your hourly rate, outsource it.
-Naval Ravikant
2018-07-16 22:03:29

Copy this link when reproducing:
http://www.casperlee.com/en/y/blog/196

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. 

/Images/20170929/01.jpg

/Images/20170929/02.jpg

/Images/20170929/03.jpg

/Images/20170929/04.jpg

/Images/20170929/05.jpg

/Images/20170929/06.jpg

1. Download and install Android Studio. Please see the link http://www.casperlee.com/en/l/blog/195 for detail.

2. Run Android Studio.

/Images/20170929/101.jpg

3. Select "Start a new Android Studio project".

/Images/20170929/102.jpg

4. Type in "Application name" and "Company Domain", it will automatically create a "Package name". Choose "Project location" and click "Next" to continue.

/Images/20170929/103.jpg

5. Tick "Phone and Tablet", select a "Minimum SDK" which the application requires, and click "Next" to continue.

/Images/20170929/104.jpg

6. Select "Empty Activity" and click "Next" to continue.

/Images/20170929/105.jpg

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.

/Images/20170929/106.jpg

8. Select "Run -> Run 'app'" from the main menu, it will ask for a "Deployment Target" as shown below.

/Images/20170929/107.jpg

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:

/Images/20170929/108.jpg

11. Done!