0

this is a gradle question in android studio. I'm really new to gradle so I hope i'll be clear.

I have a project that uses a module like this:

compile project('modules:aol-on-sdk')

This project uses a library called ExoPlayer. I need to use a newer version of it in another class. If i enter a new dependency:

compile 'com.google.android.exoplayer:exoplayer:rX.X.X'

than i get a duplicate error. I want to prevent the dependency outside the stated module.

Ari M
  • 1,386
  • 3
  • 18
  • 33
  • Check out how to exclude some modules from compilation: http://stackoverflow.com/questions/30727582/gradle-duplicate-entry – Yury Fedorov Dec 17 '15 at 08:12
  • @Orlangure I tryied it and got: `Error:(51, 0) No such property: transitive for class: org.gradle.api.internal.project.DefaultProject_Decorated` – Ari M Dec 17 '15 at 08:18
  • You don't have to use `transitive` property, maybe you should only exclude the module – Yury Fedorov Dec 17 '15 at 08:20
  • @Orlangure So, the way to make it pass the error is to add parentheses, like this: `compile (project('modules:aol-on-sdk')){}`. I've added `transitive = true` and `exclude module: 'ExoPlayer'` and i still get duplicate error. – Ari M Dec 17 '15 at 08:39

0 Answers0