1

I am a plugin developer, my plugin have dependency of two aar libraries. When i am exporting as aar archive my dependent libraries not part of it.my project structure is like below mentioned

App  
lib1  
 --aartool   
lib2   
lib3

lib1 has the dependency of lib2, lib3 and aartool files. App has aar dependency of lib1.

Lib1 using some of the customized components from aartool after that lib1 as converted to aar and used to application.But, whatever file we accessed from aartool which is not available in application and throwing classnotfoundException

Is there any way to implement these dependencies as aar?

Always i need to carry lib1 aar to application, i don't want to carry all other dependencies.

learner
  • 3,092
  • 2
  • 21
  • 33
  • hi somebody look into this, waiting so far for answer – learner Dec 31 '15 at 10:26
  • Down voters please give your valuable feedback. – learner Jan 02 '16 at 08:48
  • 1
    Please give some more details, e.g. gradle files. – Henry Jan 02 '16 at 08:58
  • 1
    are you using Gradle, or eclipse dpendency setup? The downvotes are probably for lack of details – Blundell Jan 02 '16 at 08:58
  • @henry updated my details as much as i can. – learner Jan 02 '16 at 09:25
  • "Lib1 using some of the customized components from aartool which is converted to lib1aar and used to app" -- that sentence is very unclear (it is not even valid English). Also, this is the only place in the entire question where `lib1aar` is referenced, so nobody has any idea what `lib1aar` is. To be honest, this question should have been closed as not providing a [minimal, complete, and verifiable example](http://stackoverflow.com/help/mcve). – CommonsWare Jan 06 '16 at 13:41
  • @CommonsWare updated the question which you not understood. – learner Jan 06 '16 at 13:47
  • That did not really help much. It is clear that you think that `lib1` is somehow different than `lib2`. That difference appears to have something to do with `aartool`. But nobody knows much of anything about `lib1`, or `lib2`, or `aartool`. My only suggestion is to make sure that `lib1`, in its POM, has a dependency on `aartool`. Beyond that, you need to find a local consultant, who can sign an NDA and actually see what it is that you are talking about. – CommonsWare Jan 06 '16 at 14:11
  • @CommonsWare it not about code issue , its all about dependency issue. Does not matter the name which i have given for the library.My major issue is while i am creating library, have dependency of some other libraries .when i am providing my library to client while dependent libraries not part of it(some other libraries). – learner Jan 06 '16 at 14:48
  • Having libraries depend upon other libraries works "out of the box". You do it every time you depend upon `support-v13`, or `appcompat-v7`, or most of the other major Android Support libraries, which usually have a transitive dependency upon `support-v4`. Hence, somewhere, in `lib1` or `aartool`, you have a bug, perhaps in the module's `build.gradle`. But we cannot help you with that, since we cannot see those files. You need to find a local consultant, who can sign an NDA and actually see what it is that you are talking about. – CommonsWare Jan 06 '16 at 14:54

1 Answers1

1

I am not sure I understand it correctly, but I believe you just need to add transitive dependendcies like in this question or in this.

Example:

compile ('com.foo:FOO:1.0.0@aar'){
       transitive=true
}

If you have circular dependencies you may encounter serious problems! I strongly recommend you to fix this.

Community
  • 1
  • 1
sschrass
  • 7,014
  • 6
  • 43
  • 62