我正在同步加载图像,以在加载图像后显示通知。
bitmap = picasso.load(imageUrl).get();
Run Code Online (Sandbox Code Playgroud)
一切正常,但今天我有一个例外:
Fatal Exception: java.lang.IllegalStateException: Unrecognized type of request: Request{
http://www.fulbori.com/mp/resources/image/19/17/e.jpg}
at com.squareup.picasso.BitmapHunter$2.load(BitmapHunter.java:66)
at com.squareup.picasso.BitmapHunter.hunt(BitmapHunter.java:206)
at com.squareup.picasso.RequestCreator.get(RequestCreator.java:396)
at com.jumbotail.app.utils.JtImageLoader.loadImageSync(JtImageLoader.java:397)
at com.jumbotail.app.notifs.JumboGcmIntentService.readInboundIntent(JumboGcmIntentService.java:213)
at com.jumbotail.app.notifs.JumboGcmIntentService.buildNotification(JumboGcmIntentService.java:273)
at com.jumbotail.app.notifs.JumboGcmIntentService.onHandleIntent(JumboGcmIntentService.java:49)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:174)
at android.os.HandlerThread.run(HandlerThread.java:60)
Run Code Online (Sandbox Code Playgroud)
我了解当没有请求处理程序可以处理请求时,毕加索会引发此错误。
现在,按照Uri请求的方案(是http)的canHandleRequest(Request data)方法NetworkRequestHandler应该已经返回true。
但是所有的请求处理程序都返回,false包括NetworkRequestHandler。因此,ERRORING_HANDLER毕加索返回了,导致了异常:IllegalStateException("Unrecognized type of request: " + request)。
此例外还有其他解释吗?