VerifyError with Maps Add-ons

198 views
Skip to first unread message

Zach Hobbs

unread,
May 7, 2009, 3:52:35 PM5/7/09
to Android Developers
After the first time I (re)install a new APK sometimes I get
VerifyErrors when an Activity references another Activity that extends
MapActivity. The app will crash, and then when I restart it it works
fine.

This is only on 1.5 targets with the google API addons (target 3). If
anyone has any suggestions please let me know.

Here is the logcat:
05-07 15:44:32.024: WARN/dalvikvm(16630): Unable to resolve superclass
of Lcom/tunewiki/lyricplayer/android/community/maps/MusicMapActivity;
(210)
05-07 15:44:32.024: WARN/dalvikvm(16630): Link of class 'Lcom/tunewiki/
lyricplayer/android/community/maps/MusicMapActivity;' failed
05-07 15:44:32.024: ERROR/dalvikvm(16630): Could not find class
'com.tunewiki.lyricplayer.android.community.maps.MusicMapActivity',
referenced from method
com.tunewiki.lyricplayer.android.player.VideoPlayer.launchMusicMap
05-07 15:44:32.024: WARN/dalvikvm(16630): VFY: unable to resolve const-
class 464 (Lcom/tunewiki/lyricplayer/android/community/maps/
MusicMapActivity;) in Lcom/tunewiki/lyricplayer/android/player/
VideoPlayer;
05-07 15:44:32.024: WARN/dalvikvm(16630): VFY: rejecting opcode 0x1c
at 0x0004
05-07 15:44:32.024: WARN/dalvikvm(16630): VFY: rejected Lcom/tunewiki/
lyricplayer/android/player/VideoPlayer;.launchMusicMap ()V
05-07 15:44:32.024: WARN/dalvikvm(16630): Verifier rejected class Lcom/
tunewiki/lyricplayer/android/player/VideoPlayer;
05-07 15:44:32.024: WARN/dalvikvm(16630): Class init failed in
newInstance call (Lcom/tunewiki/lyricplayer/android/player/
VideoPlayer;)
05-07 15:44:32.024: DEBUG/AndroidRuntime(16630): Shutting down VM
05-07 15:44:32.034: WARN/dalvikvm(16630): threadid=3: thread exiting
with uncaught exception (group=0x4000fe70)
05-07 15:44:32.214: ERROR/AndroidRuntime(16630): Uncaught handler:
thread main exiting due to uncaught exception
05-07 15:44:32.224: ERROR/AndroidRuntime(16630):
java.lang.VerifyError:
com.tunewiki.lyricplayer.android.player.VideoPlayer
05-07 15:44:32.224: ERROR/AndroidRuntime(16630): at
java.lang.Class.newInstanceImpl(Native Method)
05-07 15:44:32.224: ERROR/AndroidRuntime(16630): at
java.lang.Class.newInstance(Class.java:1472)
05-07 15:44:32.224: ERROR/AndroidRuntime(16630): at
android.app.Instrumentation.newActivity(Instrumentation.java:1097)
05-07 15:44:32.224: ERROR/AndroidRuntime(16630): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2186)
05-07 15:44:32.224: ERROR/AndroidRuntime(16630): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2284)
05-07 15:44:32.224: ERROR/AndroidRuntime(16630): at
android.app.ActivityThread.access$1800(ActivityThread.java:112)
05-07 15:44:32.224: ERROR/AndroidRuntime(16630): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1692)
05-07 15:44:32.224: ERROR/AndroidRuntime(16630): at
android.os.Handler.dispatchMessage(Handler.java:99)
05-07 15:44:32.224: ERROR/AndroidRuntime(16630): at
android.os.Looper.loop(Looper.java:123)
05-07 15:44:32.224: ERROR/AndroidRuntime(16630): at
android.app.ActivityThread.main(ActivityThread.java:3948)
05-07 15:44:32.224: ERROR/AndroidRuntime(16630): at
java.lang.reflect.Method.invokeNative(Native Method)
05-07 15:44:32.224: ERROR/AndroidRuntime(16630): at
java.lang.reflect.Method.invoke(Method.java:521)
05-07 15:44:32.224: ERROR/AndroidRuntime(16630): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:782)
05-07 15:44:32.224: ERROR/AndroidRuntime(16630): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
05-07 15:44:32.224: ERROR/AndroidRuntime(16630): at
dalvik.system.NativeStart.main(Native Method)

Thanks,
Zach

fadden

unread,
May 8, 2009, 4:15:56 PM5/8/09
to Android Developers
On May 7, 12:52 pm, Zach Hobbs <ho...@helloandroid.com> wrote:
> 05-07 15:44:32.024: WARN/dalvikvm(16630): Unable to resolve superclass
> of Lcom/tunewiki/lyricplayer/android/community/maps/MusicMapActivity;
> (210)
> 05-07 15:44:32.024: WARN/dalvikvm(16630): Link of class 'Lcom/tunewiki/
> lyricplayer/android/community/maps/MusicMapActivity;' failed

The superclass of MusicMapActivity couldn't be found. This prevented
the class from being loaded. Then, when VideoPlayer.launchMusicApp()
tried to refer to it, the verifier got irked:

> 05-07 15:44:32.024: ERROR/dalvikvm(16630): Could not find class
> 'com.tunewiki.lyricplayer.android.community.maps.MusicMapActivity',
> referenced from method
> com.tunewiki.lyricplayer.android.player.VideoPlayer.launchMusicMap

So your basic problem isn't a VerifyError, but rather that the
superclass of your MusicMapActivity wasn't available from the class
loader. I don't know why this would vary from run to run. I've heard
of some strange things happening with instrumentation tests; are you
using those here?

Zach Hobbs

unread,
May 11, 2009, 12:34:28 PM5/11/09
to Android Developers
Not doing any instrumentation tests. The superclass of
MusicMapActivity is com.google.android.maps.MapActivity, so how could
this class not be found? I do have "<uses-library
android:name="com.google.android.maps" />" in my Manifest under my
<application/> tag.

Thanks,
-Zach



On May 8, 4:15 pm, fadden <fad...@android.com> wrote:
> On May 7, 12:52 pm, Zach Hobbs <ho...@helloandroid.com> wrote:
>
> > 05-07 15:44:32.024: WARN/dalvikvm(16630): Unable to resolve superclass
> > of Lcom/tunewiki/lyricplayer/android/community/maps/MusicMapActivity;
> > (210)
> > 05-07 15:44:32.024: WARN/dalvikvm(16630): Link of class 'Lcom/tunewiki/
> > lyricplayer/android/community/maps/MusicMapActivity;' failed
>
> The superclass of MusicMapActivity couldn't be found.  This prevented
> the class from being loaded.  Then, when VideoPlayer.launchMusicApp()
> tried to refer to it, the verifier got irked:
>
> > 05-07 15:44:32.024: ERROR/dalvikvm(16630): Could not find class
> > 'com.tunewiki.lyricplayer.android.community.maps.MusicMapActivity',
> > referenced from method
> > com.tunewiki.lyricplayer.android.player.VideoPlayer.launchMusicMap
>
> So your basic problem isn't aVerifyError, but rather that the

gps

unread,
May 10, 2009, 1:55:32 AM5/10/09
to Android Developers
I have the same problem it seems, except mine always crashes. I've
never had it work. My LogCat is almost identical to the one above
(with obvious changes). It does not seem to be able to resolve the
superclass of any class that extends MapActivity. Any help would be
greatly appreciated!



On May 8, 4:15 pm, fadden <fad...@android.com> wrote:

Zach Hobbs

unread,
May 11, 2009, 5:55:11 PM5/11/09
to Android Developers
Some more information:

it only happens if I have a widget (unrelated to maps) enabled on the
Launcher the first time I access this MapActivity....

-Zach

Dianne Hackborn

unread,
May 11, 2009, 8:52:18 PM5/11/09
to android-d...@googlegroups.com
Hi, it looks like there is a bug initializing a process when it is launched to handle a broadcast sent to an explicit component.  In this case its shared libraries are not linked to it.  This will be fixed in a future release, but I don't know of a work-around for 1.5.
--
Dianne Hackborn
Android framework engineer
hac...@android.com

Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails.  All such questions should be posted on public forums, where I and others can see and answer them.

Zach Hobbs

unread,
May 13, 2009, 2:28:16 AM5/13/09
to Android Developers
I can run the BroadcastReceiver in another process and it does fix it,
only problem is peekService() doesn't appear to be working for me
across processes :(

Thanks anyways for the info.

-Zach
> hack...@android.com

broc

unread,
Jun 4, 2009, 12:27:17 PM6/4/09
to Android Developers
Hi,

Is this bug limited to the SDK (=only on the emulator) or is it
existing on real phone too ?

Thanks,
Sebastien.
> hack...@android.com

Alex

unread,
Jun 4, 2009, 4:40:43 PM6/4/09
to Android Developers
This happens on the device too and is kind of a show stopper. So
there is really no workaround for this?

I guess we are to assume that having both a widget and a MapActivity
is not fully supported under 1.5, which is a shame.

-Alex

broc

unread,
Jun 6, 2009, 3:21:21 PM6/6/09
to Android Developers
The only solution that works for me, but is a shame, is to include the
maps.jar library in the libs directory of the project... But the size
of the application grows...

But is it allowed to extract maps.jar from the google api add-on and
include it into our .apk ?

broc

unread,
Jun 6, 2009, 5:27:28 PM6/6/09
to Android Developers
I answer to myself: the licence agreement of the maps api doesn't
allow to include the jar in an application...
So, I have no answer...

Please release a 1.5 r3 with this bug corrected :-))

On 6 juin, 21:21, broc <sebastien.peroc...@gmail.com> wrote:
> The only solution that works for me, but is a shame, is to include themaps.jar library in the libs directory of the project... But the size
> of the application grows...
>
> But is it allowed to extractmaps.jar from the google api add-on and

broc

unread,
Jun 9, 2009, 4:42:08 AM6/9/09
to Android Developers
Hi,

As Zach Hobbs wrote on month ago, a solution is to launch either the
widget or the configure activity (and all sub-activities containing
the MapActivity) in an another process than the application by
specifying in the AndroidManifest.xml file the option
"android:process" as following:

For example below, we launch the widget in the private (because of the
':') process "otherPrivateProcess":

<application ...>
<receiver android:name=".myWidget"
android:process=":otherPrivateProcess" ...>
...
</receiver>
...
</application>

Seb.

Georgy

unread,
Jul 6, 2009, 8:31:19 PM7/6/09
to Android Developers
I am using the Google Api 1.5 that already has the maps.jar and
already included the uses-database in the manifest but still getting
that errror.

any ideas?

thansk

-lm -

unread,
Jul 13, 2009, 1:34:01 PM7/13/09
to Android Developers
This issue is very annoying. This prevents applications with a
subclass of Mapview and a widget to cohesist together.
This is a major issue.
Does anybody succeed in having both?
Thanks
Reply all
Reply to author
Forward
0 new messages