2015-12-04 38 views
0

我在我的项目里面有Volley Library(在图书馆/凌空下),但是我更喜欢使用Gradle版本的凌空图书馆(https://github.com/mcxiaoke/android-volley)。我想用“编译com.mcxiaoke.volley:库:1.0.19”中的build.gradle如何使用Gradle替换Android Volley库?

但每次我删除凌空档案库,然后进行编译时,我得到错误信息:错误:名为“默认”配置未找到。

如何替换现有的Volley库并使用gradle版本?

由于之前...

+0

尝试编译 'com.mcxiaoke.volley:库:1.0.19' –

+0

我试过了,出现错误:“**错误:(263,37)错误:r对JsonObjectRequest的引用是不明确的,JsonObjectRequest匹配中的构造函数JsonObjectRequest(int,String,String,Listener ,ErrorListener)和构造函数JsonObjectRequest(int,String,JSONObject,Listener ,ErrorListener)**“ – anunixercoder

+0

选中此[post] (http://stackoverflow.com/questions/29105222/compililation-error-while-using-jsonobjectrequest)。 –

回答

1

而不是

compile 'com.mcxiaoke.volley:library:1.0.19-SNAPSHOT'

使用

compile 'com.mcxiaoke.volley:library:1.0.19'

+0

嗨,我用过它。但现在得到错误,因为我的第一条评论 – anunixercoder

+0

你检查了这[后](http://stackoverflow.com/questions/29105222/compililation-error-while-using-jsonobjectrequest)? –

+0

是的,我读过这篇文章,并取代** jsonObjectRequest **,但带有此错误:“**错误:(267,35)错误:无法找到符号方法getRequestUrl(int)**”任何想法? – anunixercoder