Migrating from Eclipse to Android Studio



Now a days, developers are often migrating from Eclipse to Android Studio. And the Reason is quite simple, Android studio is better IDE than Eclipse. See this post to get more info Which IDE is good, Eclipse or Android Studio. But what if you already have your project built in Eclipse IDE and you want to migrate that project to Android Studio. Well guys, it's quite easy to do and all thanks to Android Studio for making it possible.
Migration is possible in two ways:
1) Importing your Eclipse project from Android Studio
2) Exporting your project from Eclipse

The Directory structure of Eclipse Project is different than that in Android Studio. So While migrating from Eclipse to Android Studio, your directory structure of project will get changed a lot. Migrating to Android Studio through importing from Android Studio is a quick and easy way to go but the problem is with the change in the directory structure. So if you want keep your Eclipse directory structure too then exporting from Eclipse is a way to do it.

1) Importing your Eclipse Project from Android Studio
Android Studio has really made the migration process a lot easy for the Developers. You just have to select your Eclipse Project from Android Studio and it will automatically make changes to your Eclipse Project and make it running on your new IDE in no time. These changes include replacing any jar files and libraries with Gradle dependencies and replacing source libraries and binary libraries, with Maven dependencies. Therefore, no need to maintain these files manually.

Steps:
a) Start Android Studio and click on Import Project. 
 

b) Select the Eclipse Project that you want to import and click ok.


c) Click Next.


d) Click Finish.


And you are Done....


2) Exporting your Project from Eclipse
Before exporting, check that Eclipse ADT is up to date or not(you will need version 22.0 or higher). Just go to Help->Check for Updates.  If there is an update then do update it.
a) Go to File->Export
b) Click on Generate Gradle build files


c) Click Next.


d) Select your Project.


e) Click Finish.


f) Then Eclipse will show you the path for the generated build.gradle.


g) Start Android Studio and Click on Import Project.


h) Select the generated build.gradle file (located in your project generated by Eclipse)

Note: if you found error related "failed to sync Gradle project"

then click on Fix Plugin version and sync project.

And you are done....
Share on Google Plus

About Unknown

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.

0 comments:

Post a Comment