Switching to Android Studio with all my existing projects in Eclipse. So what is the procedure to do that.
Android Studio stores the projects by default in the home folder of the user under AndroidStudioProjects. The main directory contains configuration files for Android Studio and the Gradle build files. The application relevant files are contained in the app folder.
There is no need to add a plugin to Android Studio but if we use Eclipse then we do need to. Eclipse needs many resources to start but Android Studio does not. Android Studio is based on IntelliJ's Idea Java IDE and Eclipse uses the ADT Plugin to develop Android applications.
To use your Android library's code in another app module, proceed as follows: Navigate to File > Project Structure > Dependencies. In the Declared Dependencies tab, click and select Library Dependency in the dropdown. In the Add Library Dependency dialog, use the search box to find the library to add.
Answer. Answer: 2. Import project (Eclipse ADT , Grade , etc.)
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
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.
Try these steps for importing an Eclipse project into Android studio:
1- Click on import project (Eclipse ADT, Gradle, etc.).
2- Choose the root folder of your project. The folder that contains bin folder.
3- Choose where you want to import it and click next.
4- Click on finish.
5- Change the view to project.
6- Open build.gradle in your src folder.
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.
8- Change your build.gradle based on your SDK version and click try again. For example, mine is 23.1.1.
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.
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:
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".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With