VerifyError in App After Upgrade
I've got a small issue which I was hoping someone could give me some insight on.
Sometimes, when a user updates my app from the market (from one version to another) they get a VerifyError upon running the app. It happens to a random class; you can use part of the app, then going to a different Activity in the app causes it to blow up. This only happens once; once Dalvik gets it out of its system it never happens again.
Since it only happens once per update (and most of the time, not at all), it is admittedly a minor issue, but I think it reflects badly on my app, so if anyone has any ideas that would be great.
The stack traces don't seem that helpful, since they always happen in a different place (which further confuses me). Here's an example of one:
java.lang.VerifyError: com.mypackage.myapp.package.SomeClass
at java.lang.Class.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1472)
at android.app.Instrumentation.newActivity(Instrumentation.java:1097)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2255)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2371)
at android.app.ActivityThread.access$1800(ActivityThread.java:118)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1759)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4077)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:782)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
at dalvik.system.NativeStart.main(Native Method)
Asked by: Rebecca205 | Posted: 25-01-2022
Answer 1
It turns out that I was being caught up with this bug: http://code.google.com/p/android/issues/detail?id=2886
The issue is that if the widget receiver loads before the app, then any attempts to access the Google Maps API in the same process fails. This only happens in Android 1.5, but it would happen each time someone upgrades the app.
The solution was to put the receivers in a different process.
Answered by: Julian710 | Posted: 26-02-2022Similar questions
unit testing - VerifyError When Running jUnit Test on Android 1.6
Here's what I'm trying to run on Android 1.6:
package com.healthlogger.test;
public class AllTests extends TestSuite
{
public static Test suite()
{
return new TestSuiteBuilder(AllTests.class).includeAllPackagesUnderHere().build();
}
}
and:
package com.healthlogger.test;
public class RecordTest extends AndroidTestCase
{
/**
* Ensures that the ...
android - VerifyError in run app on device
My device Firmware version is 1.6 and whenever I run my application on Device I got an error :
ERROR/AndroidRuntime(834): java.lang.VerifyError:
dalvikvm(834): VFY: unable to resolve static field 966 (CONTENT_URI) in Landroid/provider/ContactsContract$CommonDataKinds$Phone;
I think I am getting this error because of "android.provider.ContactsContract" class to build my application? because it's API level is...
JTwitter VerifyError in Android pre-2.0
I'm attempting to integrate JTwitter into an Android application, and I have been completely successful up until the point where I decided to regression test on older Android versions. In Android 2.x my code works great, but in Android 1.5/1.6 Dalvik throws a VerifyError on the following line:
OAuthSignpostClient oauthClient
= new OAuthSignpostClient(KEY_TWITTER, SECRET_TWITTER, "oob");
Android 3.1 VerifyError
I am running into a VerifyError after updating my Xoom to 3.1. Here is the code that seems to be causing it.
public boolean goBack()
{
if(_overlay == null || _pdfView == null) return false;
_overlay.removeView(_pdfView);
_overlay = null;
_pdfView = null;
return true;
}
Where _overlay is a FrameLayout and _pdfView
android - VerifyError deploying on API 1.6
I've come across a backwards compatibility issue when deploying my application on android 1.6. Im getting a VerifyError on this piece of code:
if(android.os.Build.VERSION.SDK_INT >= 11) {
getActionBar().setBackgroundDrawable(getResources().getDrawable(R.drawable.actionbar_bg));
}
This is not unexpected since getActionBar() doesn't exist pre API 11, however post-1.6 (API 5 and higher...
java - Avoid VerifyError overriding a method in older APIs
I'm trying to be notified when signal strength changes on Android. My application supports all the way back to Android 1.5 (API level 3), so I need something that will work for old and new APIs.
Android 1.5 defines the PhoneStateListener which is also available in the newest API versions. However, the old onSignalStrength changed method is deprecated and replaced with a newer method,
Android - VerifyError
this is an error I am getting in Android Developer Console from hundreds of my users.
I've spend entire day trying to fix the issue in code and it took 9 releases and I am still getting these error reports. My application has about 5 thousand downloads a day and on about 10% of the devices it's crashing. Rating of my application went down from 4.7 to 3.0 in just one day because of this.
I literally can't fi...
android - VerifyError for ".access"
Back-porting an app to Android 1.5, I fix VerifyError bugs all the time, but here is one that is much less obvious than usual (full log here):
W/dalvikvm( 6978): VFY: invalid reg type 8 on iput instr (need 6)
W/dalvikvm( 6978): VFY: rejecting opcode 0x5c at 0x0004
W/dalvikvm( 6978): VFY: rejected Lcom/ichi2/anki/CardEditor;.access$1776 (L...
classpath - VerifyError when using jCIFS in Android
I'm attempting to use the jCIFS version 1.3.17 JAR file in my Android app. The application compiles correctly and deploys to my phone. When my application tries to use the jCIFS library I receive the following error message:
E/dalvikvm( 3176): Could not find class 'jcifs.smb.SmbFile', referenced from method com.test.androidapp.service.BackgroundService.copyFiles
W/dalvikvm( 3176): VFY: unable to resolve new...
VerifyError In Eclipse Android
I configure eclipse Helios Service Release 2 , eclipse properly download and configure ADT and SDK,I import my old project into newly configured development environment,its showing no error . In an activity I'm creating object of another class that giving me an exception as "VerifyError" , I check my JDK in project and eclipse its 2.2 , I also check my project libraries that also have the "Android.jar" , but don't know wha...
Still can't find your answer? Check out these communities...
Android Google Support | Android Community | Android Community (Facebook) | Dev.io Android