Using SimpleXML with Android and Gradle

后端 未结 4 2000
暗喜
暗喜 2021-01-30 05:26

I\'m having troubles trying to compile an Android application with Gradle 0.5.+ and Android Studio, using SimpleXML.

This is the error:

Gradle: Execution         


        
相关标签:
4条回答
  • 2021-01-30 05:33

    Try this if previous solution doesn't work:

    configurations {
        compile.exclude module: 'stax'
        compile.exclude module: 'stax-api'
        compile.exclude module: 'xpp3'
    }
    dependencies {
        [...]
        compile 'org.simpleframework:simple-xml:2.7.+'
    }
    repositories {
        [...]
        mavenCentral()
    }
    
    0 讨论(0)
  • 2021-01-30 05:34

    I think you need to exclude some of dependencies.

    compile('org.simpleframework:simple-xml:2.7.+'){
        exclude module: 'stax'
        exclude module: 'xpp3'
    }
    
    0 讨论(0)
  • 2021-01-30 05:48

    I am getting the same error while using SimpleFramework. Actually i resolved it by adding these lines in build.gradle:

    compile('org.simpleframework:simple-xml:2.7.1') 
    {
       exclude group: 'stax', module: 'stax-api'
       exclude group: 'xpp3', module: 'xpp3'<br>
    }
    
    0 讨论(0)
  • 2021-01-30 05:49

    You need to also exclude stax-API.

    implementation('org.simpleframework:simple-xml:2.7.+'){
        exclude module: 'stax'
        exclude module: 'stax-api'
        exclude module: 'xpp3'
    }
    
    0 讨论(0)
提交回复
热议问题