1 page.title=Migrating from Eclipse 2 3 @jd:body 4 5 <div id="qv-wrapper"> 6 <div id="qv"> 7 <h2>See also</h2> 8 <ul> 9 <li><a href="http://confluence.jetbrains.com/display/IntelliJIDEA/Working+in+Eclipse+Compatibility+Mode" class="external-link" 10 >Eclipse Compatibility Mode</a></li> 11 <li><a href="http://confluence.jetbrains.com/display/IntelliJIDEA/FAQ+on+Migrating+to+IntelliJ+IDEA" class="external-link" 12 >FAQ on Migrating</a></li> 13 </ul> 14 </div> 15 </div> 16 17 <p>If you've previously developed for Android using Eclipse and would like to migrate 18 to Android Studio, you should export your projects from Eclipse in order to generate 19 Gradle build files. You can then import your project into Android Studio.</p> 20 21 22 <h2 id="Export">Export from Eclipse</h2> 23 <ol> 24 <li><a href="{@docRoot}tools/help/adt.html#Updating">Update your Eclipse ADT Plugin</a> 25 (you must have version 22.0 or higher).</li> 26 <li>In Eclipse, select <strong>File > Export</strong>.</li> 27 <li>In the window that appears, open <strong>Android</strong> and select <strong>Generate Gradle 28 build files</strong>.</li> 29 <li>Select the project you want to export for Android Studio and click 30 <strong>Finish</strong>.</li> 31 </ol> 32 33 <p>Your selected project remains in the same location but now contains a {@code build.gradle} 34 file and is ready for Android Studio.</p> 35 36 37 <h2 id="Export">Import into Android Studio</h2> 38 <ol> 39 <li>In Android Studio, close any projects currently open. You should see the 40 <strong>Welcome to Android Studio</strong> window.</li> 41 <li>Click <strong>Import Project</strong>.</li> 42 <li>Locate the project you exported from Eclipse, expand it, select the 43 <strong>build.gradle</strong> file and click <strong>OK</strong>.</li> 44 <li>In the following dialog, leave <strong>Use gradle wrapper</strong> selected and click 45 <strong>OK</strong>. (You do not need to specify the Gradle home.)</li> 46 </ol> 47 48 49 <p>Now that your project is imported to Android Studio, 50 read <a href="{@docRoot}sdk/installing/studio-tips.html">Tips and Tricks</a> for some 51 help getting started.</p> 52 53 54 <p class="note"><strong>Note:</strong> 55 It's possible to import an existing Android project to Android Studio even if you 56 don't generate a Gradle build file from Eclipse—Android Studio will successfully build and 57 run projects using an existing Ant build file. However, in order to take advantage of build 58 variants and other advanced features in the future, 59 we strongly suggest that you generate a Gradle build file using 60 the ADT plugin or write your own Gradle build file for use with Android Studio. 61 For more information about the Gradle build system, see the 62 <a href="http://tools.android.com/tech-docs/new-build-system/user-guide">Gradle 63 Plugin User Guide</a>.</p> 64