在Android项目中包含gturri android xml rpc库 [英] include gturri android xml rpc library in android project

查看:104
本文介绍了在Android项目中包含gturri android xml rpc库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要包括这个库,但是我遇到了几个问题. github上的项目库

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

我试图按照github项目上的说明进行操作,但是它们对我不起作用.我必须将库包含在android studio中.

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.

我试图: 1)复制整个代码到我的项目中,但是我在程序包方面有很多冲突,一旦解决,我就开始遇到缺少未定义功能的问题 2)我尝试使用mvn install命令,但没有成功,显示了100个错误 3)我尝试使用intelliJ打开该项目,然后尝试导出jar文件,但是intelliJ告诉它这是一个android项目

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

推荐答案

您可以尝试Jitpack.至少对我有用.

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

请参见 https://jitpack.io/

本质上:将以下代码添加到项目的build.gradle文件中:

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

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

并将以下行添加到应用程序的build.gradle文件中的"dependencies"部分:

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'

}

这篇关于在Android项目中包含gturri android xml rpc库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆