How to migrate Eclipse Android project to AndroidStudio module.

I decided to write this blog to show how to migrate an Eclipse project to android studio manually.

There is a video link at the bottom of this post which demonstrates the whole process, before that understanding the difference folder structure of android studio and eclipse is necessary,

With the recent stable release of Android Studio in December, it has replaced Eclipse as the standard Android development environment. All developers are advised to migrate to it, as the ADT Eclipse plugin will not be maintained and updated, and as of now, it is no longer supported.

In this post, I’ll have a quick look at the differences in the folder structure of the Eclipse projects and Android Studio modules.

Android Studio changes the terminology a bit. In Eclipse, you had workspaces with a number of projects and library projects in them. In Android Studio, this becomes a project with a number of modules and library modules. Apart from the names, they’re pretty much the same thing, but thanks to the mandatory Gradle build system, it tends to be more organized.

Many libraries no longer need to be copied into your workspace. Simply add a reference to the module’s build.gradle file, state the required version, and it will be automatically fetched from the remote repository, compiled and included without having to worry about it. No more hunting for Android support library JARs in the SDK folders, and no more manual Eclipse project opening nightmare. Many third-party libraries can be included in the same way with Gradle, which saves a lot of clutter. Your project folder will be neat and clean, and really only contain your own code.
Folder structure

refer below link for more details on  Gradle with android,
https://developer.android.com/tools/building/configuring-gradle.html

and migrating projects from Eclipse to Android Studio
https://developer.android.com/sdk/installing/migrate.html

Here’s a list of folders where your code and resources are stored compared to Eclipse,

   Eclipse                   Android Studio

Android manifest       [project]                 [module]/src/main
Assets                       [project]/assets      [module]/src/main/assets
Java source files       [project]/src            [module]/src/main/java
Resources                 [project]/res            [module]/src/main/res
Included JARs          [project]/libs            [module]/libs

Below screencast shows how easily an Eclipse project can be moved to Android Studio module manually.

Leave a comment