1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
page.title=Migrating to Android Studio
@jd:body
<div id="qv-wrapper">
<div id="qv">
<h2>See also</h2>
<ul>
<li><a href="http://confluence.jetbrains.com/display/IntelliJIDEA/Working+in+Eclipse+Compatibility+Mode" class="external-link"
>Eclipse Compatibility Mode</a></li>
<li><a href="http://confluence.jetbrains.com/display/IntelliJIDEA/FAQ+on+Migrating+to+IntelliJ+IDEA" class="external-link"
>FAQ on Migrating</a></li>
</ul>
</div>
</div>
<p>If you're currently using Eclipse with ADT, we recommend you migrate to
<a href="{@docRoot}tools/studio/index.html">Android Studio</a>, a new Android
development environment powered by IntelliJ IDEA. On top of the capabilities you expect from
IntelliJ, Android Studio offers:</p>
<ul>
<li>Flexible Gradle-based build system.</li>
<li>Build variants and multiple APK generation.</li>
<li>Expanded template support for Google services and various device types.</li>
<li>Rich layout editor with support for theme editing.</li>
<li>Lint tools to catch performance, usability, version compatibility, and other problems.</li>
<li>ProGuard and app-signing capabilities.</li>
<li>Built-in support for <a
href="https://developers.google.com/cloud/devtools/android_studio_templates/"
class="external-link">Google Cloud Platform</a>, making it easy to integrate Google Cloud
Messaging and App Engine.</li>
<li>And <a href="{@docRoot}tools/studio/index.html">much more</a>.</li>
</ul>
<p>To migrate existing Android projects from Eclipse,
you should export your projects from Eclipse in order to generate
Gradle build files:</p>
<ol>
<li>In Eclipse, select <strong>File > Export</strong>.</li>
<li>Select <strong>Generate Gradle build files</strong> inside the Android folder, then click
<strong>Next</strong>.</li>
<li>Click <strong>Browse</strong> to find your project to export.</li>
<li>Select your project from the list, click <strong>OK</strong>, then <strong>Finish</strong>.</li>
</ol>
<p>You can then import the project into Android Studio:</p>
<ol>
<li>In Android Studio, close any projects currently open. You should see the
<strong>Welcome to Android Studio</strong> window.</li>
<li>Click <strong>Import Project</strong>.</li>
<li>Locate the project you exported from Eclipse, expand it, select the
<strong>build.gradle</strong> file and click <strong>OK</strong>.</li>
<li>In the following dialog, leave <strong>Use gradle wrapper</strong> selected and click
<strong>OK</strong>. (You do not need to specify the Gradle home.)</li>
</ol>
<p>It's possible to import an existing Android project to Android Studio even if you
don't generate a Gradle build file from Eclipse—Android Studio will successfully build and
run projects using an existing Ant build file.</p>
<p>However, in order to take advantage of build
variants and other advanced features in the future,
we strongly suggest that you generate a Gradle build file using
the ADT plugin or write your own Gradle build file for use with Android Studio.
For more information about the build system, see the
<a href="{@docRoot}sdk/installing/studio-build.html">Build System</a> guide.</p>
|