Jar file in an Android Studio project with multiple modules -


i have single android studio project 4 modules:

  • two app modules;
  • one android library module;
  • a fourth module common shared among 2 app modules.

all modules depend on jar file developed other people.

if add jar file in libsfolder of each submodule (app, library, common) fine.

if add fifth module project import .jar or .aar package module , put dependency on in each submodule, no module finds classes in jar file.

if @ build.gradle commands 1 of 2 apps, read this:

... dependencies {     compile filetree(dir: 'libs', include: ['*.jar'])     compile 'com.android.support:appcompat-v7:21.0.3'     compile project(':library.myproject.com')     compile 'com.squareup.okhttp:okhttp:2.2.0'     compile 'com.squareup.okio:okio:1.2.0'     compile project(':commonclasses')     compile project(':servicesjar') } 

the dependencies on :library.myproject.com , :commonclasses ok. dependency on jar file :servicesjar not.

the build.gradle file jar is:

configurations.create("default") artifacts.add("default", file('server.jar')) 

what might cause?


Comments

Popular posts from this blog

How to run C# code using mono without Xamarin in Android? -

c# - SharpSsh Command Execution -

python - Specify path of savefig with pylab or matplotlib -