Android Studio imports the Eclipse project in two ways: androideclipse
Android Studio has two ways to import an Eclipse project. One is to directly import the Eclipse project to Android Studio, and the other is to convert the project in Eclipse, and then import it to Android Studio.
1. Direct import
Open Android Studio. If the project has already been opened, select close current project. A Welcome dialog box is displayed:
Select Import project (Eclipse ADT, Gradle, etc.), and then select the Eclipse project to Import:
Click "OK" and select the target folder to import. The default directory is the same, and the same project name is followed by a "1", which is actually a new directory:
Click "Next". A selection dialog box is displayed, removing the last camper naming option:
Finally, click "Finish". The import is successful:
2. indirect import
Select File> Export in Eclipse and select "Generate Gradle build files ":
Click "Next". A description dialog box is displayed:
Continue to "Next" and select the project to be converted. Note that only the project to be converted is selected. Do not select the library required for this project:
Click "Next" to see that the library required by the project is automatically included:
Click "Finish" consecutively to end operations in Eclipse. Go to Android Studio, close the current project, and enter the Welcome dialog box:
Select Import project (Eclipse ADT, Gradle, etc.) to enter the project selection dialog box. Note that this is not the project to be imported, but the build. gradle file under the Eclipse working directory:
After waiting for a while, you can see that the project and required libraries have been imported in:
To sum up, the first method is applicable to projects that do not require libraries, and the second method is applicable to projects that require libraries.