the_prole the_prole - 2 months ago 19
Android Question

How to add `Simple Framework` to gradle dependencies

I'm trying to use Simple Framework in my project. Here is the dependency in XML format.


I've tried converting the dependency to Gradle acceptable format.

compile 'simpleframework:simple-xml:2.7.1'

But, I don't think it's correct. What is the correct gradle dependecy?


The correct Gradle dependency is:

compile 'org.simpleframework:simple-xml:2.7.1'

For Android, you also have to exclude dependencies as they are already in the Android SDK

compile ('org.simpleframework:simple-xml:2.7.1') {
    exclude module: 'stax-api'
    exclude module: 'stax'
    exclude module: 'xpp3'