Exporting Android Eclipse project to Android Studio 0.3.5.

Importing a project from Eclipse ADT to Android Studio can be easy and difficult at the same time.  Before any further a do, here is the procedure to export a project generated by Eclipse ADT to Android Studio.

1. File -> Export

1 file_export

2.  Select “Generate gradle build files” from the options.

3 generate gradle build

3.  Sletect the project to be exported:

2 select project

 

4. Open Andoid Studio. Select ImportProject:

4  import to studio

5. Select the gradle.build in the app that was generated during eclipse export.

5 select gradle_build

Note: Do not import the whole eclipse project.

6. Click okay to continue.

6. gradle home

7. Error: The version of gradle you connect to does not support that method.

7 error

Dont panic, this is because, the version number is not getting updated in the gradle wrapper.properties file. We can do it manually. This answer from so, helped me resolve it.

8. Error again: Project is using an old version of gradle plugin. 

8 error

You can correct this error by just build.gradle file like so.

Change line in build.gradle from:

dependencies {
classpath ‘com.android.tools.build:gradle:0.5.+’
}

To:

dependencies {
classpath ‘com.android.tools.build:gradle:0.6.+’
}

9. Finally its imported:

10. finally

These errors are part of the current android studio 0.3.5. These errors may be corrected in the coming versions.

The following two tabs change content below.

Amal Chandran

Latest posts by Amal Chandran (see all)

Trackbacks/Pingbacks

  1. Eclipse adt vs Android Studio. | Novasys Blogs - […] Migrating from Projects from Eclipse to Android Studio. […]
  2. Android Build Automation with Gradle. | Novasys Blogs - […] latest version of eclipse ADT supports generating Gradle support. Follow this blog to export project as Gradle build files, …

Submit a Comment

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Current month ye@r day *