0

I have a project with 3 additional library project(modules) from projects I created previously.

All codes works perfectly as a stand alone, however on importing all 3, only module 1 works. The build and manifest merge are successful, no errors. Code associated with module 1 works perfect however, when user interacts with any code from 2 and 3 the application stops working and exits.

Module 1, 2 and 3 has no code interaction. Each module when configured as an application can be used entirely on its own. The program is written so that on pressing different buttons module1,2,3 is used pending which button is pressed.

I have also tested module 2 with a a test app just to see if it works as module and it does. Did the same with module 3 and the same result. However on adding both module 2 and 3 together, whichever module I add second, gives the same error as above.

Is it that android studio can only accept one module in addition to the project module?

All research indicate that it should be able to take multiple modules but I'm request assistance from you guys, my seniors.

Ss.wa
  • 31
  • 2

1 Answers1

0

In module 1's build.gradle file, make sure that the other modules are specified as dependencies. For example:

dependencies {
    ...
    compile project(':module2')
    compile project(':module3')
    ...
}

Also, in the project's settings.gradle file, make sure the other modules are included, as in:

include ':module1', ':module2', ':module3'
cybersam
  • 63,203
  • 6
  • 53
  • 76
  • The settings.gradle file was as you stated at the time I tested the code. However adding the dependencies to module one did not help. I appreciate the effort but got the same results – Ss.wa Aug 27 '15 at 01:21