Search code examples
javaandroidxmlmavenxml-rpc

include gturri android xml rpc library in android project


i need to include this library but i ve got several problems. project library on github

i tried to follow the instructions on the github project but they did not work for me. I have to include the library in android studio.

i tried to: 1) copy the whole code in my project but i had a lot of conflicts about package, and, once solved, i began to have problems about lacks of functions not defined 2) i tried to use mvn install command, but it did not work, something like 100 errors displayed 3) i tried to open that project with intelliJ and then i tried to export jar file, but intelliJ told that it s an android project

does anyone have any idea about the procedure to include this library? Thanks a lot in advance


Solution

  • you could give Jitpack a try. At least it worked for me..

    See https://jitpack.io/

    In essence: add following code to the build.gradle file of your project:

    allprojects {
        repositories {
            jcenter()
            maven { url "https://jitpack.io" }
        }
    }
    

    and add the following line to the dependencies section in the build.gradle file of your app:

    `compile 'com.github.gturri:aXMLRPC:master-SNAPSHOT'`
    

    here is what the dependency section looks like for me:

    dependencies {
        compile fileTree(dir: 'libs', include: ['*.jar'])
        testCompile 'junit:junit:4.12'
        compile 'com.android.support:appcompat-v7:23.4.0'
        compile 'com.android.support:design:23.4.0'
        compile 'com.github.gturri:aXMLRPC:master-SNAPSHOT'
        compile 'com.android.support:support-v4:23.4.0'
    

    }