Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VFY: unable to resolve [lots of stuff]

Tags:

android

I came back to work today and I started debugging my app using the emulator (KitKat), and my app runs ok. I had made some changes since last Friday, but not much.

Then I moved to the device (Gingerbread) and notices the app, that was working last week, had started to crash right on main activity's setContentView(). Here are the warning/error messages:

W/ActivityThread﹕ Application com.example.myapp is waiting for the debugger on port 8100...
W/dalvikvm﹕ VFY: unable to resolve static method 790: Landroid/net/TrafficStats;.setThreadStatsTag (I)V
W/dalvikvm﹕ VFY: unable to resolve instance field 50
W/dalvikvm﹕ VFY: unable to resolve virtual method 95: Landroid/app/Activity;.getFragmentManager ()Landroid/app/FragmentManager;
W/dalvikvm﹕ Unable to resolve superclass of Lmaps/aj/r; (671)
W/dalvikvm﹕ Link of class 'Lmaps/aj/r;' failed
W/dalvikvm﹕ Unable to resolve superclass of Lmaps/ay/an; (6382)
W/dalvikvm﹕ Link of class 'Lmaps/ay/an;' failed
W/dalvikvm﹕ Unable to resolve superclass of Lmaps/c/i; (6613)
W/dalvikvm﹕ Link of class 'Lmaps/c/i;' failed
E/dalvikvm﹕ Could not find class 'maps.c.i', referenced from method maps.e.al.a
W/dalvikvm﹕ VFY: unable to resolve new-instance 6818 (Lmaps/c/i;) in Lmaps/e/al;

All these messages appear after the setContentView method.

I noticed that it mentions getFragmentManager, however that's not part of my app. Since it has API 9 compatibility, I'm using the AppCompat v7, getSupportFragmentManager and including the Supporteverywhere it is needed.

I've undone the changes I did earlier today, but it still doesn't work. Is it possible that the appcompat lib was updated recently? I'm using Gradle to get most of them:

dependencies {
    compile 'com.android.support:appcompat-v7:+'
    compile 'com.google.android.gms:play-services:+@aar'
    compile 'com.google.code.gson:gson:+@jar'
    compile 'com.google.zxing:android-integration:+@jar'
    compile 'com.googlecode.libphonenumber:libphonenumber:+@jar'
    compile 'com.intellij:annotations:12.0'
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile project(':Facebook')
}

I don't know how to debug these VFY errors. What can I do to try to solve them?

like image 650
Guilherme Avatar asked Apr 14 '14 18:04

Guilherme


1 Answers

I don't know how to debug these VFY errors

They are not errors. They are warnings. The "W" in the beginning of each line is short for "warning".

Those warnings are merely noting classes, methods, and other symbols that Dalvik saw when loading classes from your APK that it could not resolve. So long as you do not actually execute any code that contains any of that missing stuff, everything will be fine. Moreover, they are largely unavoidable, as they are a natural side-effect of application and library code using newer capabilities on newer devices where those capabilities are supported.

like image 134
CommonsWare Avatar answered Oct 17 '22 19:10

CommonsWare