Android--android Studio Import Eclipse Project

Source: Internet
Author: User

Eclipse Project Import to Android Studio

Operation Steps:

1. Eclipse exports the Gradle project.

2, as import.

3, wait patiently.

4. Change the Gradle version (not required)

Select an upgrade channel. As the upgrade is can choose to upgrade their own channels, different channels of the release version is not the same,

I choose the stable channel, each channel corresponds to what version here does not explain, there is a description on the Internet.

1. Eclipse exports the Gradle project.

    1. File->Export,Generate Gradle build Files and then the next step,
    2. Select the items you want to export (without having to rely on the project, which will be automatically exported),

2, as import.

    1. Select "Import Non-andorid Studio Project", it must be this option, otherwise the import has a problem
    2. If your as is not in this interface, then through file->close project You can enter this interface.
    3. Then find the item in step 1 and you can import it successfully.

3, wait patiently.

It may be slow to import because you want to download Gradle, and then wait for the download to complete. If it is because of the problem of their own network, then use VPN, proxy and the like (File->settings->http proxy).

4. Change the Gradle version (not required)

Generally exported items will have version inconsistency problem, then in as prompt repair Gradle version, agree to repair on it.

Based on the above steps, the project is basically migrated successfully.

If you have multiple dependent packages on your project, then you might compile, but probably suggest that there are multiple identical packages , such as SUPPORT-V4 packages. If you encounter such a problem, you can do the following.

1, delete the Support-v4.jar.

2, then add the V4 package, open Project Structrue (ctrl+alt+shift+s), find just the module, select Dependencies, click on the right "+" to add V4 package again.

Official documents

Here are the official documents, which I have done according to the official documentation, summarizing the issues I have done and the problems I have encountered.

To migrate existing Android projects, simply import them using Android Studio:

      in Android Studio, close any projects currently open. You should see the Welcome to Android Studio  window.
    1. CLICK  Import non-android Studio project .
    2. Build.gradle  file and Click  OK .
    3. in the following dialog, leave  use Gradle wrapper   Selected and click  OK . (You don't need to specify the Gradle home.)  

Android Studio properly updates the project structure and creates the appropriate Gradle build file.

Official Android Studio documentation in http://developer.android.com/tools/studio/index.html

Based on the above steps, the project is basically migrated successfully. If you have multiple dependent packages on your project, then you might compile, but probably suggest that there are multiple identical packages, such as SUPPORT-V4 packages. If you encounter such a problem, you can do the following.

Android--android Studio 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.