0

I have Volley Library inside my Project (under libraries/volley), However i prefer to use Gradle version of volley library (https://github.com/mcxiaoke/android-volley). I want to use "compile com.mcxiaoke.volley:library:1.0.19" in build.gradle

But everytime i deleted Volley File Library then i got error message when compiled : Error:Configuration with name 'default' not found.

How to replace existing Volley Library and use gradle version ?

Thanks before...

questionasker
  • 2,536
  • 12
  • 55
  • 119
  • try compile 'com.mcxiaoke.volley:library:1.0.19' – Dhaval Patel Dec 04 '15 at 06:39
  • I've tried it, then appear error : "**Error:(263, 37) error: reference to JsonObjectRequest is ambiguous, both constructor JsonObjectRequest(int,String,String,Listener,ErrorListener) in JsonObjectRequest and constructor JsonObjectRequest(int,String,JSONObject,Listener,ErrorListener) in JsonObjectRequest match**" – questionasker Dec 04 '15 at 06:44
  • Check this [post](http://stackoverflow.com/questions/29105222/compililation-error-while-using-jsonobjectrequest). – Dhaval Patel Dec 04 '15 at 06:45

1 Answers1

1

Instead of

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

Use

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

Dhaval Patel
  • 10,119
  • 5
  • 43
  • 46
  • hi, i've used it. but now getting error as same as on my first comment – questionasker Dec 04 '15 at 06:49
  • Have you checked this [post](http://stackoverflow.com/questions/29105222/compililation-error-while-using-jsonobjectrequest)? – Dhaval Patel Dec 04 '15 at 06:50
  • Yes, i've read that post and replaced **jsonObjectRequest**, but come with this error : "**Error:(267, 35) error: cannot find symbol method getRequestUrl(int)**" any idea ? – questionasker Dec 04 '15 at 06:55
  • replace `getRequestUrl(int)` with your `URL`. – Dhaval Patel Dec 04 '15 at 06:56
  • Thanks it works! but the last one, everytime i deleted volley file library, i get error "**Error:A problem occurred configuring project ':twb'. > Cannot evaluate module volley : Configuration with name 'default' not found.**" Do i need to delete module Volley ? – questionasker Dec 04 '15 at 07:03
  • Found Solution [here](http://stackoverflow.com/questions/16710290/how-to-delete-a-module-in-android-studio), I will mark your answer as accepted...btw, thank you very much... – questionasker Dec 04 '15 at 07:11