Android IllegalAccessError java.util.concurrent.TimeUnit.toHours
<p>Why would this:</p>

<pre><code>long diffInMis = date2.getTime() - date.getTime();
diffInHour = TimeUnit.MILLISECONDS.toHours(diffInMis);
</code></pre>

<p>throw this:</p>

<blockquote>
  <p>java.lang.IllegalAccessError: tried to access method
  java.util.concurrent.TimeUnit.toHours:(Z)V</p>
</blockquote>

<p>?</p>

<p>I have that error in the developer console and cannot reproduce it.
By know i just do the math on my own, but I am curious.</p>

<p>Device: HTC Legend Android 2.2</p>

<p>Answer: TimeUnit missing in API &lt; 9</p>
