Upgrade the Android development environment to Android Studio and Genymotion

Source: Internet
Author: User

2014 on the first day of the New Year, the android development environment is fully upgraded. Mainly do two things: 1. I switched the IDE from eclipse to Android Studio (and removed a new link with IBM Rational, which is somewhat sentimental. However, the old one won't be new ), move the previous Android projects to the new IDE. use Genymotion to replace the emulator that comes with Android.

Install Genymotion

1. You need to register an account for free before downloading and installing Genymotion. This account is not only required for downloading, but will also be used when you create a virtual configuration later.

2. download and install the Genymotion installation package with VirtualBox. In windows

For details, click the official website


Install Android Studio

Android Studio is a development IDE built on IntelliJ idea. It integrates a variety of convenient android tools, including Gradle-based build support, code check tools such as lint and android SDK. Here is the windows version.

After the download is complete, follow the prompts to install.

For details, click Official Site


Use Android Studio (import GreenDroid as an example)

GreenDroid is an open-source library used to simplify android UI development. However, many of the APIS provided by GreenDroid are supported by the Android SDK of higher versions. Therefore, the owner of this project no longer maintains it, but check whether the code can still receive a lot of goods. The following uses GreenDroid as an example to describe how to use Android Studio.

After Android Studio is started, a quick start interface is displayed. You can choose to open an existing project or create/import a project, or choose plugin management. You can install Genymotion plugin at this time, or you can open the project and then install the plugin.

Download greendroid (Git command: git clone http://github.com/cyrilmottier/GreenDroid.git).

Assume that GreenDroid is downloaded to the Directory d: \ projects \ greendroid. There are two ways to import greendroid to Android Studio. The first is to import gradle. This requires you to first import GreenDroid in Eclipse, then export it to generate the Gradle file, and then click import project and select the Directory d: \ projects \ greendroid \ bin \ gradle. When I import the file in this way, I always report the error that the gradle file version is too low, so the second method is used. The import process is as follows:

1. Click import project and select the Directory d: \ projects (note that the Directory d: \ projects \ greendroid cannot be selected; otherwise, it is mandatory to import gradle ). The system prompts the import method. Select the first option: Create project from existing sources.

2. Set the project name GreenDroid and project location to d: \ projects \ greendroid, and press wizard to complete the import. Note: When you go to the "select project SDK" Page, select the Google API version below Android 3.0 for two reasons. First, Google Map APIs are used in projects. Therefore, map must be selected. google APIs of jar are used as targets, but Android 3.0 and above support ActionBar, which conflicts with the ActionBar of GreenDroid and produces many errors.

After the project is imported, it is automatically built. After the build is complete, click the run icon to start the ADT emulator and automatically load and run the demo Application GDCatalog.

Set GenyMotion plugin

Click VM in the toolbar of Android Studio (unfortunately genymotion 2.0 or above does not support Google APIs. For details, see this link ). To Run an application on a GenyMotion virtual Device, click Run-> Edit Configuration to open the Run/Debug Configuration Dialog box, and select Show Choose Dialog in the Target Device section. In this way, you will be asked which device is used to run the application, and then select genymotion.


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.