include gturri android xml rpc library in android project

别说谁变了你拦得住时间么 提交于 2019-12-23 05:30:14

问题


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


回答1:


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'

}



来源:https://stackoverflow.com/questions/38161326/include-gturri-android-xml-rpc-library-in-android-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!