Android Studio (ii) Import Eclipse project

Source: Internet
Author: User

One, import a single eclipse project

1. Export the project with Gradle in Eclipse, as follows:

If the Finish button is grayed out in the action, force overriding will be forced to override the check box, as shown in.

When the operation is complete, it does not replicate the project, but instead adds some gradle-related files to the original project's directory, which are the files that are required to import the existing project into Android Studio.

Project structure:

2. The preparation is ready and you can now import the project into Android studio.

Before importing, understand the project concepts and module concepts in Android Studio.

Im port project refers to importing a project structure, which is equivalent to working space. Import module refers to importing a project.

So before we import the project, we need to create a new workspace, which is the following.

File->new Poject

The first step:

The application name here is equivalent to the directory structure in the workspace. For example, in general, large projects are more than one project, but there are multiple and mutually quoted cases. At this time, the Project01 equivalent to the entire project name, that is, the current work space projects.

Step Two:

Choose what kind of activity, this can be based on their own circumstances, I generally choose Add No Activity.

Once created, the following interface is displayed

At this point, you need to click Project on the left to expand the structure, as follows:

But this structure is not a habit for people accustomed to eclipse. You can click on Android to select the package structure as follows:

The third step is to import the project that you just saw in eclipse into Android studio.

File->import Module

The project structure after the import is complete, such as:



two . Import the entire project structure

However, in real-world development, a project consists of multiple project folders, which are referenced by each other. How do I import this?

Actually, the operation is almost the same as above. As for the overall one export, I will not, I am to have them a separate build Gradle file, and then import into Android Studio.

If there is an error in the middle, the solution provided is:

① before generating the Gradle file, it will refer to the other library and let it become a whole to generate gradle files.

Ii...

I tried it myself, and the results were as follows:

The front shows are all blue marks, no error.

For the time being, write it here first, and if you find a new problem later, revise your blog. What is the problem, please message exchange, learn from each other.









Android Studio (ii) Import Eclipse project

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.