How do I open my existing Eclipse projects in Android Studio?

Solution 1:

Export from Eclipse

1.Update your Eclipse ADT Plugin (you must have version 22.0 or higher).

2.In Eclipse, select File > Export.

3.In the window that appears, open Android and select Generate Gradle build files.

4.Select the projects you want to export for Android Studio and click Finish.

Your selected projects remain in the same location but now contain a build.gradle file and are ready for Android Studio.

Import into Android Studio

1.In Android Studio, select File > Import Project.

2.Locate a project you exported from Eclipse, select the project's root directory and click OK.

3.Select Create project from existing sources and click Next.

4.Follow the walk-through to complete the import process.

for more info clickhere

some FAQ Eclipse Migration FAQ

Migrating to Android Studio

Solution 2:

The official release of Android Studio (version 1.0.2 at the time of this writing) now supports importing ADT projects directly. In fact, when trying to export from ADT, there is now a popup that suggests importing directly from Android Studio is a better choice.

Just open Android Studio > Import Non-Android Studio Projects > Select your ADT project folder.

It creates a new AS-version of your project, and reports items that need your manual verification.

Solution 3:

Try these steps for importing an Eclipse project into Android studio:

1- Click on import project (Eclipse ADT, Gradle, etc.).

enter image description here

2- Choose the root folder of your project. The folder that contains bin folder.

enter image description here

3- Choose where you want to import it and click next.

enter image description here

4- Click on finish.

enter image description here enter image description here

5- Change the view to project.

enter image description here

6- Open build.gradle in your src folder.

enter image description here

7- You should find out your current SDK version. So, click on tools-> Android-> SDK Manager-> Launch standalone SDK Manager and scroll to the bottom.

enter image description here enter image description here

8- Change your build.gradle based on your SDK version and click try again. For example, mine is 23.1.1.

enter image description here enter image description here

If you have any library that is not added automatically please visit https://stackoverflow.com/a/35369267/5475941 to add it manually.I hope it helps.

enter image description here

Solution 4:

Forget the import, just hand build it.

After trying and failing to import the project I did the following hand-import. I gained trust that the export / import procedure didn't leave behind any problems and I gained knowledge of the new build system:

  1. In Android studio create a new blank project
  2. Build it out to device to trust that it is working
  3. Slowly a bit at a time add in your previous code, leaving behind anything specific to the old build system

It is a slow process but the debugging is much more focused on your actual code rather than trying to figure out "what the import actually did".

Solution 5:

you may get the answer in this link link

To import an existing Android app project, click Import Project.

Note: If you previously developed your Android project with Eclipse, you should first use the new export feature in the ADT plugin to prepare your project with the new Gradle build system.