5

Hey I've been trying for hours to import an Android library (BetterPickers latest commit) into my project using Gradle

After importing and setting it as module, I get compilation errors. It seems like something is wrong with dependencies in my build.gradle .

build.gradle of library project
build.gradle of main project

As you can see, Android Studio suggests an autofix but it's not helpful. error

When I try to run the project/Gradle build, I get compilation errors since the library project is dependent on nineolddroids lib. When I try to add nineolddroids to the dependencies I get a different error:

Could not resolve all dependencies for configuration ':sub:bp:_DebugCompile'.

Could not find com.nineoldandroids:library:2.4.0.)

I guess both of them are derived from the same thing. How can I fix this?

A few remarks

  • Using latest Android Studio (0.2.5)

  • Android Support Repository is installed

  • In the main project, the support lib is imported just fine and I get no compilation errors when using classes from support lib

  • Tried many ways to import the library project, including answers from here

Community
  • 1
  • 1
idanakav
  • 1,466
  • 1
  • 13
  • 23
  • The two links for the gradle build files are the same. – Bas Aug 26 '13 at 16:12
  • Is the "library project" `:sub:bp`? If not, can you post the .gradle file for that? Thought, it seems you are referencing the NineOldAndroids library but it's nowhere to be found. – rfgamaral Aug 28 '13 at 03:47
  • 1
    yes its the library project , and i already posted it its the first link above (build.gradle of library project), and the error i posted of nineolddroids is the log of `gradlew --refresh -dependencies` – idanakav Aug 28 '13 at 07:10
  • 'but when i try to add nineolddroids to dependencies i get different error' - Did you add it to one of the gradle files? I can't find it... – Bas Aug 28 '13 at 18:51
  • @Bas yes if i add `compile 'com.nineoldandroids:library:2.4.0'` to dependencies of library project gradle file i get the same error i mentioned – idanakav Aug 28 '13 at 21:10
  • 3
    Did you manage to fix this? – igordc Feb 12 '14 at 22:23

0 Answers0