3

I want to create one code base for multiple applications.

I know that in ecllipse,we can have multiple applications and library project in one workspace.In this way we had a benefit that we have all our applications in single place(workspace) and can use the single library project without much effort.

But In android studio.I have not found any solution for this.Till now I have only one solution that I can make a library project and I should copy and paste this library folder in my projects.then I can use that library according to my need.I cannot use the flavours.I found it complicated for me.Also I think it shouldn't fulfil my requirements.

But there's two problem.

1.I cannot keep all my projects in one workspace.

2.If my library folder becomes larger in size then there may be a chance that my application will also become larger.And I could not able to find a way to make a gradle out of the library project and use that gradle/jar file in my application.And also I don't want to store my library project in maven/jcenter.

What should I do?Can u help my guys.Please suggest me if you have any idea.

Developer
  • 103
  • 12
  • 1
    see this . http://stackoverflow.com/questions/16646114/android-studio-how-to-open-multiple-project-in-single-window – KishuDroid Oct 21 '15 at 10:44

1 Answers1

0

There is a way to simulate the way Eclipse works.

Basically you need to create an empty project (= Eclipse workspace) and add the modules you need (= Eclipse project).

File > New > Project... > Empty Project. After entering the location/name, click Finish. A Project Structure dialog should appear. Click on the green + button and press Add module (or Import module, if your IntelliJ module already exists). Now you can create an Android Module, just like you create an Android project.

The only difference to Eclipse is that you cannot close modules. You can however remove them by pressing Del (or right click > Remove module) and add them again via New > Module from Existing Sources and selecting the *.iml file of a module (not the directory).

Darek Kay
  • 15,827
  • 7
  • 64
  • 61