Before you can develop an android app, you should first set up the Android development environment. This article will show you how to do that step by step.
1. Download Android Studio.
- Android studio becomes more popular today, it is provided by Google. First, you should go to the android studio download page to get the latest version.
- You can see the prerequisite on that page also. So you should download and install JDK 1.8 before installing it.
- Please Note: If you live on china’s mainland, you can click here to get the latest version of android studio.
2. Install Android Studio.
- After download, double-click the executable file to start the installation process.
- The first dialog shows you a welcome page, just click the Next button to continue.
- The next page is the components that will be installed, please check them all.
- Android SDK is just like Java SDK, it provides a lot of library files that needed when developing an app.
- Android Virtual Device is a device simulator which can help you debug and test your app in numerous android devices, it provides a lot of devices with different screen resolution. You can add a custom virtual device after installation. Click the Next button to continue.
- The next dialog will show you where the android studio and SDK files saved on the hard disk. You can choose the directory as you like. You had better select a directory without white space in the directory name, this can avoid some unnecessary errors.
- When you complete the installation steps, after a restart, a component download wizard will continue to download the necessary components. This may take some time, please be patient.
- When you see information like Android SDK is up to date in the dialog and the Finish button is enabled, it means the installation is successful. Click the Finish button to complete it.
3. Use AVD Manager To Manage Android Device Simulator.
- After installation, click the Windows Start —> Android Studio —> Android Studio menu item to start it up.
- When you start it for the first time, it will popup a project wizard to let you choose an existing project or create a new project. Because this is the first project, so please choose to create a new android project, please be patient also, this may take a long time to initialize the new project for the first time.
- After creating the new project, you can see the IDE graphical user interface, please note the button named “AVD manager” in the top toolbar, we will use it to create the device simulator.
- Now click the “AVD manager” button in the android studio top toolbar, it will open the Android Virtual Device Manager window.
- If there has no virtual device added, there will popup a create virtual device wizard. You can create a virtual device for mobile phone, tablet, watch, car device, and TV.
- Click the “Create Virtual Device” button in the Android Virtual Device Manager window, it will popup the virtual device detail setting wizard. You can choose any type and screen resolution as you need.
- After you choose the virtual device you need, click the Next button, you can see the system image list wizard, if the selected android operating system image does not exist, you can download it by clicking the Download link beside it.
- After download, click the Finish button to complete it, then click Next —> Finish button to go back to the Android Virtual Device Manager —> Your Virtual Devices list window.
- Click the green triangle button in right to start an android virtual device. This also may take some time, please be patient.
- When the virtual device started, you can use it as a real device, in my example, it is a mobile phone. You can open a web browser in it and browse web pages. I will write more articles later to tell you how to write android applications.