title: Cannot cast from Object to int in eclipse
body: <p>In my android application, at line below:</p>
  
  <pre><code>int add= (int) arg0.getTag();
  </code></pre>
  
  <p>getting error:</p>
  
  <pre><code>Cannot cast from Object to int
  </code></pre>
  
  <p>When I replace <code>int</code> to <code>integer</code> getting another error at line below:</p>
  
  <pre><code>sp = (Spinner) findViewById(add);
  </code></pre>
  
  <p>error is:</p>
  
  <pre><code>The method findViewById(int) in the type Activity is not applicable for the arguments (R.integer)
  </code></pre>
  
  <p>Kindly suggest me, hope for reply.</p>
  
  <p>Thanks</p>