title: Android: async task An error occured while executing doInBackground()
body: <p>before use Async Tasks my code is work. So i have done some changes in my code and now progress bar is showing up but getting the below errors.</p>
  
  <p>Log cat:</p>
  
  <pre><code>08-07 06:43:15.875: E/AndroidRuntime(1734): FATAL EXCEPTION: AsyncTask #1
  08-07 06:43:15.875: E/AndroidRuntime(1734): java.lang.RuntimeException: An error occured while executing doInBackground()
  08-07 06:43:15.875: E/AndroidRuntime(1734):     at android.os.AsyncTask$3.done(AsyncTask.java:299)
  08-07 06:43:15.875: E/AndroidRuntime(1734):     at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273)
  08-07 06:43:15.875: E/AndroidRuntime(1734):     at java.util.concurrent.FutureTask.setException(FutureTask.java:124)
  08-07 06:43:15.875: E/AndroidRuntime(1734):     ... 18 more
  </code></pre>
  
  <p>mycode:</p>
  
  <pre><code>        protected String doInBackground(String... args) {
              final EditText eKey = (EditText) findViewById(R.id.edtxt_key);
              inputs = eKey.getText().toString();
              if (inputs.matches("")) {
  
              } else {
                  keys = url + inputs;
                  JSONParser jParser = new JSONParser();
                  JSONObject json = jParser.getJSONFromUrl(keys);
                  try {
                      satu = json.getJSONObject(TAG_1);
                      String two = satu.getString(TAG_2);
                      String three = satu.getString(TAG_3);
                      if (two.matches("") | three.matches("")) {
                          AlertDialog.Builder builder = new AertDialog.Builder(MainActivity.this);
                          builder.setMessage("not found!").setCancelable(false).setPositiveButton("OK", new DialogInterface.OnClickListener() {
                              public void onClick(DialogInterface dialog, int id) {
                                   eKey.setText("");
                                   status.setText("Key not found!");
                              }
                          });
                          AlertDialog alert = builder.create();
                          alert.show();
                      } else {
                          Intent x = new Intent(MainActivity.this, result.class);
                          x.putExtra("bac", two);
                          x.putExtra("cab", three);
                          startActivity(x);
                          eKey.setText("");
                          keys = "";
                          inputs = "";
                      }
                  } catch (JSONException e) {
                      e.printStackTrace();
                  }
              }
              return null;
          }
  </code></pre>
  
  <p>What is going wrong? Thanks in advance.</p>