无法解决[很多问题]

时间:2022-09-04 10:19:24

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.

我今天回来工作,我开始使用模拟器(KitKat)调试我的应用程序,我的应用程序运行正常。自上星期五以来,我做了一些改变,但改变不多。

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:

然后我移动到设备(姜饼)上,注意到上周还在运行的应用程序已经开始在main activity的setContentView()上崩溃。以下是警告/错误信息:

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.

所有这些消息都出现在setContentView方法之后。

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.

我注意到它提到了getFragmentManager,不过这并不是我的应用程序的一部分,因为它有API 9兼容性,所以我使用AppCompat v7, getSupportFragmentManager,包括它需要的所有支持。

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:

我把今天早些时候做的改变都做完了,但还是没用。appcompat lib是否有可能是最近更新的?我用的是等级来获取其中的大部分:

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?

我不知道如何调试这些VFY错误。我能做些什么来解决它们?

1 个解决方案

#1


6  

I don't know how to debug these VFY errors

我不知道如何调试这些VFY错误

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

他们并没有错误。他们警告。每一行开头的W是“警告”的缩写。

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.

这些警告只是指出了Dalvik在从APK加载类时看到的无法解析的类、方法和其他符号。只要您不实际执行任何包含任何丢失内容的代码,一切都会很好。此外,它们在很大程度上是不可避免的,因为它们是应用程序和库代码在支持这些功能的新设备上使用更新功能的自然副作用。

#1


6  

I don't know how to debug these VFY errors

我不知道如何调试这些VFY错误

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

他们并没有错误。他们警告。每一行开头的W是“警告”的缩写。

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.

这些警告只是指出了Dalvik在从APK加载类时看到的无法解析的类、方法和其他符号。只要您不实际执行任何包含任何丢失内容的代码,一切都会很好。此外,它们在很大程度上是不可避免的,因为它们是应用程序和库代码在支持这些功能的新设备上使用更新功能的自然副作用。