bugfix> java > 投稿

私は AsyncTask を持っています以下のコードで

private void getJSON(final String urlWebService) {
  class GetJSON extends AsyncTask<Void, Void, String> {
        @Override
        protected void onPreExecute() {
         super.onPreExecute();
        }

        @Override
        protected void onPostExecute(String s) {
              super.onPostExcute();
        }
        @Override
        protected String doInBackground(Void... voids) {
         try {
           URL url = new URL(urlWebService);
           HttpURLConnection con = (HttpURLConnection) url.openConnection();
           StringBuilder sb = new StringBuilder();
            BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(con.getInputStream()));
             String json;
             while ((json = bufferedReader.readLine()) != null) {
               sb.append(json);
              }
              return sb.toString().trim();
            } catch (Exception e) {
                    Log.i("BG Exception", e.getMessage());
               return "";
            }
        }
    }
    new GetJSON().execute();

しかし、残念ながら error を返します以下のような

java.lang.VerifyError: Verifier rejected class net.simplifiedlearning.androidjsonparsing.MainActivity$100000000$GetJSON due to bad method void net.simplifiedlearning.androidjsonparsing.MainActivity$100000000$GetJSON.<init>(net.simplifiedlearning.androidjsonparsing.MainActivity, java.lang.String) (declaration of 'net.simplifiedlearning.androidjsonparsing.MainActivity$100000000$GetJSON' appears in /data/app/net.simplifiedlearning.androidjsonparsing-1/base.apk)
05-25 11:04:26.146 29104 29104 E   AndroidRuntime                               at net.simplifiedlearning.androidjsonparsing.MainActivity.getJSON(MainActivity.java:76)