ericwjr ericwjr - 1 year ago 50
Android Question

Does anyone know how to resolve an ivy dependency in Android Studio?

Here is the repository:

I am trying to add the jar dependency found here:

Answer Source

You will need to configure the repository and layout. Some repositories (like this one) are unique in that they separate artifacts (JARs, ZIPs, etc) from Ivy metadata. You'll have to tell Gradle what the layout (directory structure) of the repository looks like so it knows how to construct the download URLs. For more info see the Gradle documentation on Ivy repositories.

For your specific example you'll want to add the following to your build script:

repositories {
     ivy {
         url ''
         layout 'pattern' , {
             artifact 'artifact/[organisation]/[module]/[revision]/[type]s/[artifact](.[ext])'
             ivy 'ivy2/[organisation]/[module]/[revision]/ivy.xml'

dependencies {
    compile 'org.opendof.core-java:dof-oal:7.0.4'