ericwjr ericwjr - 1 year ago 91
Android Question

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

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 'https://asset.opendof.org'
         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'
}
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download