Looping JSON Array : >     I'm trying to make a program that will display multiple titles with 
> pictures under them.  I looked over stackoverflow, and can't get
> any of the suggestions to work for me. All my errors are within private
> void ShowJSON
>     
>     package br.exemplozxingintegration;
>     
>     import android.annotation.SuppressLint;
>     import android.app.ProgressDialog;
>     import android.content.ClipData;
>     import android.content.ClipboardManager;
>     import android.content.Intent;
>     import android.os.Bundle;
>     import android.support.v7.app.AppCompatActivity;
>     import android.view.View;
>     import android.widget.Button;
>     import android.widget.EditText;
>     import android.widget.ImageView;
>     import android.widget.TextView;
>     import android.widget.Toast;
>     
>     import com.android.volley.RequestQueue;
>     import com.android.volley.Response;
>     import com.android.volley.VolleyError;
>     import com.android.volley.toolbox.StringRequest;
>     import com.android.volley.toolbox.Volley;
>     import com.squareup.picasso.Picasso;
>     
>     import org.json.JSONArray;
>     import org.json.JSONException;
>     import org.json.JSONObject;
>     
>     
>     
>     public class ForthActivty extends AppCompatActivity implements View.OnClickListener  {
>     
>         private EditText  pastetext;
>         private ClipboardManager myClipboard;
>         private ClipData myClip;
>         private Button btn;
>         private Button btn2;
>         private EditText textView1;
>         private Button buttonGet;
>         private TextView textViewResult;
>         private ImageView ImageView1;
>     
>         private ProgressDialog loading;
>     
>     
>         @Override
>         protected void onCreate(Bundle savedInstanceState) {
>             super.onCreate(savedInstanceState);
>     
>             setContentView(R.layout.activity_forth_activty);
>             myClipboard = (ClipboardManager) getSystemService(CLIPBOARD_SERVICE);
>             pastetext = (EditText) findViewById(R.id.textView1);
>     
>             btn = (Button)findViewById(R.id.buttonPaste);
>             btn.performClick();
>     
>     
>             textView1 = (EditText) findViewById(R.id.textView1);
>             buttonGet = (Button) findViewById(R.id.buttonGet);
>             textViewResult = (TextView) findViewById(R.id.textViewResult);
>             ImageView1= (ImageView) findViewById(R.id.imageView1);
>     
>             buttonGet.setOnClickListener(this);
>     
>             btn2 = (Button)findViewById(R.id.buttonGet);
>             btn2.performClick();
>     
>     
>         }
>     
>         @SuppressLint("NewApi")
>         public void paste(View view) {
>             ClipData cp = myClipboard.getPrimaryClip();
>             ClipData.Item item = cp.getItemAt(0);
>             String text = item.getText().toString();
>             pastetext.setText(text);
>             Toast.makeText(getApplicationContext(), "",
>                     Toast.LENGTH_SHORT).show();}
>     
>     
>         private void getData() {
>             String qrcode = textView1.getText().toString().trim();
>             if (qrcode.equals("")) {
>                 Toast.makeText(this, "", Toast.LENGTH_LONG).show();
>                 return;
>             }
>             loading = ProgressDialog.show(this,"Please wait...","Fetching...",false,false);
>     
>             String url = ConfigRec.DATA_URL+textView1.getText().toString().trim();
>     
>             StringRequest stringRequest = new StringRequest(url, new Response.Listener<String>() {
>                 @Override
>                 public void onResponse(String response) {
>                     loading.dismiss();
>                     showJSON(response);
>                 }
>             },
>                     new Response.ErrorListener() {
>                         @Override
>                         public void onErrorResponse(VolleyError error) {
>                             Toast.makeText(ForthActivty.this,error.getMessage().toString(),Toast.LENGTH_LONG).show();
>                         }
>                     });
>     
>             RequestQueue requestQueue = Volley.newRequestQueue(this);
>             requestQueue.add(stringRequest);
>         }
>     
>         private void showJSON(String response){
>             String title="";
>             String image = "";
>             try {
>                 for(int response=0;response<JSONArray.length();response++)
>                 JSONObject jsonObject = new JSONObject(response);
>                 JSONArray result = jsonObject.getJSONArray(ConfigRec.JSON_ARRAY);
>                 JSONObject androidData = result.getJSONObject(0);
>                 title = androidData.getString(ConfigRec.KEY_TITLE);
>                 image = androidData.getString(ConfigRec.KEY_IMAGE);
>             } catch (JSONException e) {
>                 e.printStackTrace();
>             }
>             textViewResult.setText(title);//+"\nImagine :\t"+ image);
>             //int id = >getResources().getIdentifier("http://192.168.1.254/2015/380panel/uploads/images>/sm/"+ image, null, null);
>             //ImageView1.setImageURI(id);
>             >Picasso.with(this).load("http://192.168.1.254/2015/380panel/uploads/images/sm/+ image).into(ImageView1);
>     
>         }
> 
> 
> 
> 

   
And my errors are: Variable response is already defined in the scope

Non-static method length cannot be referenced from a static context 

Cannot resolve constructor JSONobject(int)

Cannot resolve symbol JSONobject