the_prole the_prole - 1 year ago 123
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?

Answer Source

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'
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download