title: Casting when migrating to Android Studio
body: <p>I'm working on an old project built on Eclipse and having it opened in Android Studio. Originally built with version 1.7, i'm now on 1.8, having tried 1.7 with no success.</p>
  
  <p>My main problem is i get the 3 following errors:</p>
  
  <pre><code>float size = (float) Float.parseFloat(v.getTag(R.string.size));
  </code></pre>
  
  <blockquote>
    <p>Error:</p>
  </blockquote>
  
  <pre><code>Error: Error:(228, 71) java: incompatible types: java.lang.Object cannot be converted to java.lang.String
  </code></pre>
  
  <p>Code:
      int pos = (int) v.getTag(R.string.pos);</p>
  
  <pre><code>Error: Error:(229, 49) java: incompatible types: java.lang.Object cannot be converted to int
  </code></pre>
  
  <blockquote>
    <p>Code:</p>
  </blockquote>
  
  <pre><code>int parentpos = (int) v.getTag(R.string.parentpos);
  </code></pre>
  
  <blockquote>
    <p>Error:</p>
  </blockquote>
  
  <pre><code>Error: Error:(234, 63) java: incompatible types: java.lang.Object cannot be converted to int
  </code></pre>
  
  <p>I know it is trying to convert an object to integer. I've tried several possible solutions, but had no luck. Any possible changes in the code that i cannot obviously thing about?</p>
  
  <p>Thanks!</p>