title: java.lang.NoSuchMethodError: No virtual method setTag(Ljava/lang/Object;)
body: <p>I just finish my codes for using log in and registration screen with volley</p>
  
  <p>but on running in emulator i get this error</p>
  
  <pre><code>java.lang.NoSuchMethodError: No virtual method setTag(Ljava/lang/Object;)Lcom/android/volley/Request; in class Lcom/android/volley/Request; or its super classes (declaration of 'com.android.volley.Request' appears in /data/app/com.dreacot.street_crime-2/split_lib_dependencies_apk.apk:classes10.dex)
  </code></pre>
  
  <p>according to the debug these are the files with issues</p>
  
  <p>please can anyone tell me what i am doing wrong?</p>
  
  <p><strong>AppController.java</strong></p>
  
  <pre><code>public class AppController extends Application {
  
  public static final String TAG = AppController.class.getSimpleName();
  
  private RequestQueue mRequestQueue;
  
  private static AppController mInstance;
  
  @Override
  public void onCreate() {
      super.onCreate();
      mInstance = this;
  }
  
  public static synchronized AppController getInstance() {
      return mInstance;
  }
  
  public RequestQueue getRequestQueue() {
      if (mRequestQueue == null) {
          mRequestQueue = Volley.newRequestQueue(getApplicationContext());
      }
  
      return mRequestQueue;
  }
  
  public &lt;T&gt; void addToRequestQueue(Request&lt;T&gt; req, String tag) {
      req.setTag(TextUtils.isEmpty(tag) ? TAG : tag);
      getRequestQueue().add(req);
  }
  
  public &lt;T&gt; void addToRequestQueue(Request&lt;T&gt; req) {
      req.setTag(TAG);
      getRequestQueue().add(req);
  }
  
  public void cancelPendingRequests(Object tag) {
      if (mRequestQueue != null) {
          mRequestQueue.cancelAll(tag);
      }
  }
  }
  </code></pre>
  
  <p><strong>SignUpActivity.java</strong></p>
  
  <pre><code>public class SignupActivity extends Activity {
  
  private static final String TAG = SignupActivity.class.getSimpleName();
  Button regbutton;
  private EditText inputFullName;
  private EditText inputEmail;
  private EditText inputPassword;
  private SessionManager session;
  private SQLiteHandler db;
  
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      // Set View to register.xml
      setContentView(R.layout.activity_register);
  
      inputFullName = (EditText) findViewById(R.id.reg_username);
      inputEmail = (EditText) findViewById(R.id.reg_email);
      inputPassword = (EditText) findViewById(R.id.reg_password);
  
      // Session manager
      session = new SessionManager(getApplicationContext());
  
      // SQLite database handler
      db = new SQLiteHandler(getApplicationContext());
  
      // Check if user is already logged in or not
      if (session.isLoggedIn()) {
          // User is already logged in. Take him to main activity
          Intent intent = new Intent(SignupActivity.this,
                  AfterLogin.class);
          startActivity(intent);
          finish();
      }
  
      addListenerOnButton();
  
      TextView loginScreen = (TextView) findViewById(R.id.link_to_login);
  
      // Listening to Login Screen link
      loginScreen.setOnClickListener(new View.OnClickListener() {
  
          public void onClick(View arg0) {
              // Closing registration screen
              // Switching to Login Screen/closing register screen
              finish();
          }
      });
  
  }
  
  public void addListenerOnButton() {
  
      regbutton = (Button) findViewById(R.id.btnRegister);
  
      regbutton.setOnClickListener(new View.OnClickListener() {
  
          @Override
          public void onClick(View arg0) {
              String name = inputFullName.getText().toString().trim();
              String email = inputEmail.getText().toString().trim();
              String password = inputPassword.getText().toString().trim();
  
              if (!name.isEmpty() &amp;&amp; !email.isEmpty() &amp;&amp; !password.isEmpty()) {
                  registerUser(name, email, password);
              } else {
                  Toast.makeText(getApplicationContext(),
                          "Please enter your details!", Toast.LENGTH_LONG)
                          .show();
              }
          }
      });
  }
  /**
   * Function to store user in MySQL database will post params(tag, name,
   * email, password) to register url
   * */
  private void registerUser(final String name, final String email,
                            final String password) {
      // Tag used to cancel the request
      String tag_string_req = "req_register";
  
      StringRequest strReq = new StringRequest(Method.POST,
              AppConfig.URL_REGISTER, new Response.Listener&lt;String&gt;() {
  
          @Override
          public void onResponse(String response) {
              Log.d(TAG, "Register Response: " + response.toString());
  
              try {
                  JSONObject jObj = new JSONObject(response);
                  boolean error = jObj.getBoolean("error");
                  if (!error) {
                      // User successfully stored in MySQL
                      // Now store the user in sqlite
                      String uid = jObj.getString("uid");
  
                      JSONObject user = jObj.getJSONObject("user");
                      String name = user.getString("name");
                      String email = user.getString("email");
                      String created_at = user
                              .getString("created_at");
  
                      // Inserting row in users table
                      db.addUser(name, email, uid, created_at);
  
                      Toast.makeText(getApplicationContext(), "User successfully registered. Try login now!", Toast.LENGTH_LONG).show();
  
                      // Launch login activity
                      Intent intent = new Intent(
                              SignupActivity.this,
                              LoginActivity.class);
                      startActivity(intent);
                      finish();
                  } else {
  
                      // Error occurred in registration. Get the error
                      // message
                      String errorMsg = jObj.getString("error_msg");
                      Toast.makeText(getApplicationContext(),
                              errorMsg, Toast.LENGTH_LONG).show();
                  }
              } catch (JSONException e) {
                  e.printStackTrace();
              }
  
          }
      }, new Response.ErrorListener() {
  
          @Override
          public void onErrorResponse(VolleyError error) {
              Log.e(TAG, "Registration Error: " + error.getMessage());
              Toast.makeText(getApplicationContext(),
                      error.getMessage(), Toast.LENGTH_LONG).show();
          }
      }) {
  
          @Override
          protected Map&lt;String, String&gt; getParams() {
              // Posting params to register url
              Map&lt;String, String&gt; params = new HashMap&lt;String, String&gt;();
              params.put("name", name);
              params.put("email", email);
              params.put("password", password);
  
              return params;
          }
  
      };
  
      // Adding request to request queue
      AppController.getInstance().addToRequestQueue(strReq, tag_string_req);
  }
  }
  </code></pre>
  
  <p><strong>Log</strong></p>
  
  <pre><code>06-05 15:38:27.457 28919-28919/com.dreacot.street_crime E/AndroidRuntime: FATAL EXCEPTION: main
                                                                        Process: com.dreacot.street_crime, PID: 28919
                                                                        java.lang.NoSuchMethodError: No virtual method setTag(Ljava/lang/Object;)Lcom/android/volley/Request; in class Lcom/android/volley/Request; or its super classes (declaration of 'com.android.volley.Request' appears in /data/app/com.dreacot.street_crime-2/split_lib_dependencies_apk.apk:classes10.dex)
                                                                            at com.dreacot.street_crime.app.AppController.addToRequestQueue(AppController.java:37)
                                                                            at com.dreacot.street_crime.other.SignupActivity.registerUser(SignupActivity.java:181)
                                                                            at com.dreacot.street_crime.other.SignupActivity.access$300(SignupActivity.java:31)
                                                                            at com.dreacot.street_crime.other.SignupActivity$2.onClick(SignupActivity.java:94)
                                                                            at android.view.View.performClick(View.java:5610)
                                                                            at android.view.View.onKeyUp(View.java:10581)
                                                                            at android.widget.TextView.onKeyUp(TextView.java:6435)
                                                                            at android.view.KeyEvent.dispatch(KeyEvent.java:2700)
                                                                            at android.view.View.dispatchKeyEvent(View.java:9880)
                                                                            at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1667)
                                                                            at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1667)
                                                                            at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1667)
                                                                            at android.widget.ScrollView.dispatchKeyEvent(ScrollView.java:379)
                                                                            at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1667)
                                                                            at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1667)
                                                                            at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1667)
                                                                            at com.android.internal.policy.DecorView.superDispatchKeyEvent(DecorView.java:403)
                                                                            at com.android.internal.policy.PhoneWindow.superDispatchKeyEvent(PhoneWindow.java:1800)
                                                                            at android.app.Activity.dispatchKeyEvent(Activity.java:3021)
                                                                            at com.android.internal.policy.DecorView.dispatchKeyEvent(DecorView.java:317)
                                                                            at android.view.ViewRootImpl$ViewPostImeInputStage.processKeyEvent(ViewRootImpl.java:4327)
                                                                            at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4298)
                                                                            at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3849)
                                                                            at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3902)
                                                                            at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3868)
                                                                            at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3995)
                                                                            at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3876)
                                                                            at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4052)
                                                                            at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3849)
                                                                            at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3902)
                                                                            at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3868)
                                                                            at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3876)
                                                                            at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3849)
                                                                            at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:6210)
                                                                            at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:6184)
                                                                            at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:6145)
                                                                            at android.view.ViewRootImpl$ViewRootHandler.handleMessage(ViewRootImpl.java:3647)
                                                                            at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                            at android.os.Looper.loop(Looper.java:154)
                                                                            at android.app.ActivityThread.main(ActivityThread.java:6077)
                                                                            at java.lang.reflect.Method.invoke(Native Method)
                                                                            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
                                                                            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
  </code></pre>