VerifyError issue with Android 1.5 devices

by Mariano Kamp » Thu, 14 Jan 2010 23:43:57 GMT

Sponsored Links
  got an error message from a user that runs Android 1.5. The error reported
os a java.lang.VerifyError and it seems to be based on the method
setBuildInZoomControls missing. The thing is that this method should be
there on an Android 1.5 device and my app's manifest specifies the minimum
sdk level as "3".


The documentation for that method says that it is available on level 3:

So why do I get this error message?


Short Excerpt:

01-13 12:08:13.548 I/ActivityManager( 55): Starting activity: Intent {
comp={com.newsrob/com.newsrob.activities.ShowArticleActivity} (has extras) }
*01-13 12:08:13.738 E/dalvikvm( 407): Could not find method
android.webkit.WebSettings.setBuiltInZoomControls, referenced from method
01-13 12:08:13.738 W/dalvikvm( 407): VFY: unable to resolve virtual method
248: Landroid/webkit/WebSettings;.setBuiltInZoomControls (Z)V
01-13 12:08:13.738 W/dalvikvm( 407): VFY: rejecting opcode 0x6e at 0x004c
01-13 12:08:13.738 W/dalvikvm( 407): VFY: rejected
01-13 12:08:13.738 W/dalvikvm( 407): Verifier rejected class
01-13 12:08:13.768 W/dalvikvm( 407): Class init failed in newInstance call
01-13 12:08:13.768 D/AndroidRuntime( 407): Shutting down VM
01-13 12:08:13.768 W/dalvikvm( 407): threadid=3: thread exiting with
uncaught exception (group=0x4000fe70)
01-13 12:08:13.948 E/NewsRob ( 407): Caught the following exception:
*01-13 12:08:13.948 E/NewsRob ( 407): java.lang.VerifyError:

Longer Excerpt:

01-13 12:08:06.988 D/com.newsrob.AssetContentProvider( 407): onCreate()
01-13 12:08:07.498 D/ 407):
setupMedium status=mounted mounted false->true, read-only false->false,
shared false -> false.
01-13 12:08:07.528 D/NewsRob ( 407): NewsRob.onCreate()
01-13 12:08:07.528 D/NewsRobDefaultExceptionHandler( 407): Default
01-13 12:08:07.588 W/NewsRob ( 407): No debug properties loaded.
01-13 12:08:08.348 W/IInputConnectionWrapper( 101): showStatusIcon on
inactive InputConnection
01-13 12:08:08.448 I/ActivityManager( 55): Displayed activity
com.newsrob/.DashboardListActivity: 2653 ms
01-13 12:08:09.758 I/ActivityManager( 55): Starting activity: Intent {
comp={com.newsrob/com.newsrob.activities.FeedListActivity} (has extras) }
01-13 12:08:10.488 I/ActivityManager( 55): Displayed activity
com.newsrob/.activities.FeedListActivity: 729 ms
01-13 12:08:11.258 I/ActivityManager( 55): Starting activity: Intent {
comp={com.newsrob/com.newsrob.activities.ArticleListActivity} (has extras) }
01-13 12:08:11.848 D/dalvikvm( 55): GC freed 15105 objects / 728320 bytes
in 303ms
01-13 12:08:12.168 D/dalvikvm( 407): GC freed 3444 objects / 199360 bytes
in 123ms
01-13 12:08:12.928 I/ActivityManager( 55): Displayed activity
com.newsrob/.activities.ArticleListActivity: 1665 ms
01-13 12:08:13.548 I/ActivityManager( 55): Starting a

VerifyError issue with Android 1.5 devices

by TreKing » Fri, 15 Jan 2010 00:32:30 GMT

  ran into an issue with the Motorola Cliq maps implementation (on 1.5) that
wasn't happening on other phones because that device's particular build
didn't have the correct implementation of the MyLocationOverlay class.

Do you know which device specifically? Sounds like another one of those
awesome device-specific issues. If you know which device, do a search and
see if it's a known issue with it.

Love your app BTW =)

TreKing - Chicago transit tracking app for Android-powered devices

On Thu, Jan 14, 2010 at 9:43 AM, Mariano Kamp <>wrote:


Sponsored Links

VerifyError issue with Android 1.5 devices

by Mariano Kamp » Fri, 15 Jan 2010 00:56:53 GMT


Ah, I see. That would make "sense". Then I will revert back my code to use
reflection again and put the zoom controls in the GUI myself if the method
is not there.

Yes, I do. At least about the one user that sent the report:

01-13 12:08:17.068 D/NewsRobDefaultExceptionHandler(  407): -- Android
Version: sdk=3, release=1.5, inc=138607
01-13 12:08:17.068 D/NewsRobDefaultExceptionHandler(  407): -- Custom ROM:
Stock Android
01-13 12:08:17.068 D/NewsRobDefaultExceptionHandler(  407): -- Device:
01-13 12:08:17.068 D/NewsRobDefaultExceptionHandler(  407): -- Model: HTC

Two more users reported in the Market comments it would force close on their
Heroes. Might be the same issue, but it is strange that they didn't send the
automatic bug report then.

googled< ;q=HTC+%2BMagic+%2BsetBuiltInZoomControls+-map+-mapView&aq=f&oq=&aqi=>it,
but didn't find anything, except my post and reports about the Map's
setBuiltInZoomControls method missing.
I'll do the reflection thing from above and hope that I find an affected
user that can try it out.

Love your app BTW =)
Awesome. Thanks for letting me know.
It looks like (see above) you have to suffer through another bugfix update
though ;-)

VerifyError issue with Android 1.5 devices

by fadden » Fri, 15 Jan 2010 06:04:44 GMT


One quick thing to try: watch logcat while installing your app,
keeping an eye out for verification errors.

The verifier's behavior changed for certain types of failures in 2.0.
In 1.6 and earlier, illegal access and class/method/field resolution
failures resulted in immediate rejection of the entire class.  In 2.0+
the VM inserts an "always throw" instruction at the point of the
problem, so you don't get an exception unless the bogus code is
actually executed.

The verifier will still whine about it, e.g.:

I/dalvikvm( 1514): Could not find method
other.Mutant.disappearingMethod, referenced from method
W/dalvikvm( 1514): VFY: unable to resolve virtual method 16: Lother/
Mutant;.disappearingMethod ()V
D/dalvikvm( 1514): VFY: replacing opcode 0x6e at 0x000d

so if there's a problem you can see it in the logs even if the problem
code isn't being run.

What you really want to do is get a hold of the relevant dex/apk files
and poke through them with "dexdump" to see what's actually there, but
that may not be feasible.

Other Threads

1. json

pls help for reteriving data from the webserver usin json


2. GeoCoding Problems

I'm trying to use the GeoCoder to get the lat/lon for a couple of
addresses.  I'm running into an error where the address list comes
back empty sometimes.  It seems to be completely random.  I have a
start point and an end point to draw and route.  Sometimes I can't get
either one, sometimes I can get the start but not the end, sometimes I
can get the end but not the start.  I never seem to be able to get
both.  Not sure why.  Yesterday it worked fine.  Any thoughts?


3. Switching font

4. Random ClassCastException in Stress testing

5. How to make screen shoots for an android device?

6. OpenGL - 3D rotation from a 2D input

7. somebody stole our app and resale it on the market.