studio--How to migrate projects in Eclipse to Android Studio

Source: Internet
Author: User
Tags build gradle

If you have previously worked with Eclipse for Android, and now want to import projects from eclipse into the environment of Android studio, the first thing to do is to generate the files for build Gradle. Because Android Studio uses Gradle to manage projects, here's how to do it:

Export from Eclipse
1. Upgrade your ADT plugin version to more than 22.0.
2. In Eclipse, select File-->export.
3. In the pop-up export window, open the Android folder and select "Generate Gradle Build Files".
4. Select the project you want to import into Android studio, Finish.
PS: The exported project will be in the same directory as the original project, overwriting the original, will add a file called Build.gradle, the import of Android studio will first read this file.

Import to Android Studio
1. In Android Studio, first turn off your current open project.
2. On the Welcome screen, click Import Project (note: You can also select Import Project directly from the menu)
3. Select the project you exported in Eclipse, expand the directory, click the Build.gradle file, and then OK
4. After the pop-up dialog, you will be asked to select the Gradle configuration, select the Use Gradle wrapper. (Note: You can also customize the gradle of your own machine)


PS: If you do not have a grade build file, you can also import a normal Android project into Android Studio, which will use the existing ant Build. But in order to better use the post-function and make full use of build variables, it is strongly recommended to first generate the Gradle file from the ADT plugin and import it into Android Studio

studio--How to migrate projects in Eclipse to Android Studio

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.