Eclipse Project Import Android Studio

Source: Internet
Author: User

Recently Eclipse a lot of projects to Android Studio Baidu turned to read a lot of articles this good special record under

Address: http://www.cnblogs.com/bluestorm/p/3757402.html

First, import projects from Eclipse to Android Studio

According to the official introduction, Android Studio can be compatible with Eclipse's existing project, but requires some action:

First upgrade ADT to the latest version, currently with version number 22 (note that the components associated with ADT should be upgraded to avoid possible late errors)

Select the project you want to export from Eclipse, right-click Export and select Generate Gradle Build Files under Android (for example):

After the selection is not exported to other places, but in the local project generated a build.gradle file, in the Eclipse project can also be seen, this file is recognized by Android studio, such as:

3. Then go to Android Studio and select Import Project, and you can see that the project icon just in Eclipse has become an Android robot icon, indicating that the conversion was successful, when you select Project Import:

Now that you've finished importing an existing Android project from Eclipse to Android Studio, you're ready to start working on the project!

Ii. the difference between Eclipse Engineering and Android Studio

The Eclipse project can be imported into Android studio to run, whereas the project built in Android Studio cannot run in eclipse;

The engineering structure of the two is different, and in Eclipse, a project represents a program project, and in Android studio, like IntelliJ, a project represents a workspace, Equivalent to workspace in Eclipse, and a module in Android Studio is equivalent to a project in Eclipse, a concept that needs to be understood, not mixed, or confused.

On the edit operation, you must manually command+s save the file after editing the changes in Eclipse, and in Android Studio it is automatically saved as IntelliJ, which is similar to the 2nd and Xcode.

The difference in the project catalog, in Eclipse in the SRC section is generally a Java file, the res part is a resource file, including layout files and multimedia resources. In Android Studio, you can look at the directory structure:

including Java files and resource files are placed in the SRC directory, the SRC directory includes a main folder, and the following is the Java folder and Res folder, in fact, here, the Java folder is equivalent to Src,res in eclipse or that res, Here reminds of Motoyama Teacher's sketch "Src is not that SRC, res or that res."

Third, the real machine operation and common shortcut keys

In Android Studio, click on the Android tab under the interface to see device information and Logcat, the android tab after connecting to the device will detect the real machine, after success will be displayed in the device, click on the top of the small green Arrow can start to run the project. One thing to note is that the runtime can choose the simulator can also choose the real machine, because there is a device priority when running the project in Android Studio, if not set up may appear only to run on the emulator, we can set it ourselves: first click the Run menu Select the Run Configuration and select the target device you want to select, either the simulator and the real machine, or the user can select from the run:

Shortcut keys you can be familiar with the official documents, such as the following table, you can also modify the configuration options to customize:

Eclipse Project Import Android Studio

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.