草庐IT

AuthenticatedJsonRequest

全部标签

android - 截击同步请求永远阻塞

我想使用volley库进行同步请求,我使用了以下代码:RequestFuturefuture=RequestFuture.newFuture();AuthenticatedJsonRequestrequest=newAuthenticatedJsonRequest(Method.GET,ServiceUrl,null,future,future);requestQueue.add(request);try{Longresponse=future.get();但是代码在这里永远阻塞:Longresponse=future.get();这是我的自定义JsonRequestpubliccla