I am creating a memory game but it doesn't open the pictures. I have seen similar questions but they aren't helpful to my problem. Here is the error
List<Photo> photos =new ArrayList<>();
@BindView(R.id.txt_player_one) TextView playerOneTextView;
@BindView(R.id.txt_player_two) TextView playerTwoTextView;
The part with JSON : JsonObjectRequest photoRequest = new JsonObjectRequest (Request.Method.GET, uriBuilder.toString(), null, new Response.Listener() {
@Override
public void onResponse(JSONObject response) {
photos = PhotoJsonUtils.extractPhotos(response);
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
}
});
The code that shows Image:
private void showImage(ImageView img, int card) {
if (cardsArray[card] == 101) {
Picasso.with(this).load(photos.get(0).getImgUrl()).into(img);
} else if (cardsArray[card] == 102) {
Picasso.with(this).load(photos.get(1).getImgUrl()).into(img);
} else if (cardsArray[card] == 103)