Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio: Importing project into existing project

I've got a Eclipse project which I somehow managed to get working in Android Studio awhile back. It uses TouchDB library/project which I now want to upgrade to their latest offering couchbase-lite-android which looks like it comes ready built for Android Studio with gradle files.

However I'm at a loss how to go ahead and import this project into my existing one. File -> Import Project gives me 3 options, create project from existing sources, import from external model (mavern), import from external model (gradle)

If I choose gradle it builds couchdbase-lite-android then opens it into it's own Android Studio window, it definitely doesn't get imported into my current project.

Any ideas...

like image 292
KingFu Avatar asked Jul 12 '13 22:07

KingFu


People also ask

How do I copy one Android project to another?

Select your project then go to Refactor -> Copy... . Android Studio will ask you the new name and where you want to copy the project. Provide the same. After the copying is done, open your new project in Android Studio.

How do I export and import an Android Studio project?

Then take the folder (in the workspace folder) of the project and copy it to a flash memory or whatever. Then when you get comfortable at home, copy this folder in the workspace folder you've already created, open the Android Studio and go to File then Open and import this project into your workspace.


2 Answers

Try going to File -> "Import Module" instead of "Import Project". In Android Studio, an entire window is a project. Each top-level item in that project is called a module. Coming from the Eclipse world, it'd be:

Eclipse workspace = Android Studio project

Eclipse project = Android Studio module

like image 57
Greg Avatar answered Oct 18 '22 04:10

Greg


As for Android Studio ver. 2.1.2 (which I have now) it should be File - New - Import Module... and then choose the path to the project folder to be imported.

like image 34
Alexey Timokhin Avatar answered Oct 18 '22 02:10

Alexey Timokhin