Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>For the <a href="http://developer.android.com/reference/java/lang/VerifyError.html" rel="nofollow noreferrer"><code>VerifyError</code></a> part, the question <a href="https://stackoverflow.com/questions/668788/android-java-lang-verifyerror">Android java.lang.VerifyError?</a> mentions the necessity to run any 3rd party JAR files through the <strong><a href="http://developer.android.com/guide/developing/tools/othertools.html#dx" rel="nofollow noreferrer">"dx" tool</a></strong> that ships with the Android SDK.</p> <p>The <a href="http://developer.android.com/guide/appendix/api-levels.html#fc" rel="nofollow noreferrer">compatibility section</a> of Android mentions:</p> <blockquote> <p>If your application uses APIs introduced in the latest platform version but does not declare a <strong><code>android:minSdkVersion</code></strong> attribute, then it will run properly on devices running the latest version of the platform, but not on devices running earlier versions of the platform.</p> </blockquote> <p>So that attribute needs to be set (to 1.5 in your case), while you are compiling your project with a 2.0 SDK.</p> <p>In the case of the OP <a href="https://stackoverflow.com/users/263111/nathan">nathan</a>:</p> <blockquote> <p><strong>I was compiling with 2.01 while having my target and minimum sdk =3, and then testing on avd with 1.5.</strong></p> </blockquote> <hr> <p><a href="http://osdir.com/ml/Android-Developers/2009-10/msg01351.html" rel="nofollow noreferrer">This thread</a> adds:</p> <blockquote> <p>Pretty much all <code>VerifyErrors</code> are build errors</p> </blockquote> <p>According to <a href="http://osdir.com/ml/Android-Developers/2010-02/msg00740.html" rel="nofollow noreferrer">this one</a>:</p> <blockquote> <p>Android 2.x will give you a more specific exception (<code>NoSuchMethod</code>, <code>ClassNotFound</code>) at the point of the failure rather than an ambiguous "<code>VerifyError</code>" for the entire class. Unfortunately it's likely failing on the older versions of the OS.</p> </blockquote> <p>Sometimes, this error is about a <a href="http://markmail.org/message/2thafc2fp4ukywrr#query:android%20new%20thread%20verifyerror+page:1+mid:gflpvlyv25lcb27p+state:results" rel="nofollow noreferrer">missing class</a>, or <a href="http://www.ruby-forum.com/topic/167642" rel="nofollow noreferrer">missing jars</a>, or because of some process space need to be separated with <a href="http://code.google.com/p/android/issues/detail?id=2886" rel="nofollow noreferrer"><code>android:process=":otherProcess"</code> tag</a>.</p> <hr> <p>So what that means is:</p> <p>Trying to catch such a <code>VerifyError</code> exception is likely to fail.<br> See <a href="https://stackoverflow.com/questions/2014102/cant-catch-java-lang-verifyerror">can’t catch java.lang.VerifyError</a></p> <blockquote> <p><strong>As a general rule, it's a good idea to tick the "Filter by API level" checkbox when browsing the API documentation</strong></p> </blockquote>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload