How to merge two Android-Studio project's

2019-08-18 16:40发布

问题:

i know this question has been asked several times. but i had to find out that it was a long time ago and there were no solutions.

so my question:

i have a big project "A", for this project i have made and tested a subproject "a" in a separate app. Now I want to bring these projects together or rather inform, project "a" in "A".

what's the best approach?

回答1:

You can import your second project as a Gradle Project to your first Android Studio Project.

You can import project via:

1.a. From Project view, click right click your project root and follow New/Module.

1.b. And then, choose "Import Gradle Project".

1.c. Select your second project's module root.


2. You can follow File/New/New Module and same as 1.b.


3. You can follow File/New/Import Module and same as 1.c.


When you imported existing Gradle Project, you can see it on the configurations drop-down menu. You can run, debug or even compile for release them separately.