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. Png image not rendering correct

When trying to process this png image, webkit displays it blurry.

To test, open your browser and go to this site

This same image works on other webkit based browsers like Chrome.

Seems to be some bug with the way webkit renders this type of image.



2. include tags lead to "resources don't contain package for resource number..."


I'm working on an application that displays one of the activities
differently depending on the screen size. For this purpose I have
included  a file "my_layout.xml" in each of the  folders:

The problem is that since the files my_layout use the include tag to
include another layout located in the folder "layout", I get a warning
"Resources don't contain package for resource number..." and the
application uses the DEFAULT layout for large screens and not the

the weird thing is that if I run the application on medium or small
screen , the right layout is chosen.



3. Built in ratingbar leaves alot to be desired, has anyone implemented a custom component that works better?

4. Animation and flickering - a possible solution

5. Launch an Activity Form a Service

6. video gallery within tab view

7. concept of sync