Что я делаю не так, каждый раз при попытке вывести картинку на UI у меня вылетает NULLPOINTEREXCEPTION ?
Код в ответе
InputStream inputStream = response.body().byteStream();
Bitmap bitmap = BitmapFactory.decodeStream(inputStream);
imageView.setImageBitmap(bitmap);
-----ЗАПРОС---
code lang="java">
@GET("img/wn/{image}@2x.png")
Call updateImage(@Path("image") String image);
Retrofit request2 = new Retrofit.Builder()
.baseUrl(base_url)
.addConverterFactory(GsonConverterFactory.create())
.client(client)
.build();
Server: openresty/1.9.7.1
Date: Fri, 28 Aug 2020 14:03:29 GMT
Content-Type: image/png
Content-Length: 1869
Last-Modified: Mon, 24 Jun 2019 13:32:32 GMT
Connection: keep-alive
ETag: "5d10d0f0-74d"
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET
Access-Control-Allow-Headers: origin, content-type, accept
Expires: Fri, 04 Sep 2020 14:03:29 GMT
Cache-Control: max-age=604800
Accept-Ranges: bytes
D/OkHttp: <-- END HTTP (binary 1869-byte body omitted)