Why can't the dalvikvm find method android.content.pm.ApplicationInfo.loadLogo ?
08-15 15:19:45.112: D/dalvikvm(319): VFY: replacing opcode 0x6e at 0x008b
08-15 15:19:45.112: I/dalvikvm(319): Could not find method android.content.pm.ApplicationInfo.loadLogo,
referenced from method android.support.v7.internal.widget.ActionBarView.<init>
08-15 15:19:45.112: W/dalvikvm(319): VFY: unable to resolve virtual method 417:Landroid/content/pm/ApplicationInfo;
.loadLogo (Landroid/content/pm/PackageManager;)Landroid/graphics/drawable/Drawable;
Someone here posted a problem with this on a different site. His solution was:
Got it. Found no applied style which causes my problem but found a workaround for this...
Directly after applying the style via setTheme(R.style.Theme_Sherlock);
i'm using the following code to set the background color.
View v = act.getWindow().getDecorView();
if (v != null){
v.setBackgroundColor(R.color.abs__background_holo_dark);
}
Now everything is working like expected.
loadLogo() is new to API Level 9. If you are running this on API Level 8 or below, you will get this warning.
Related
I am currently trying to get GooglePlayServices working, but I have no idea why it doesn't. In the manifest there is the permission in the application context:
<meta-data android:name="com.google.android.gms.version" android:value="#integer/google_play_services_version" />
However, every time I try to check if GooglePlayServices is connected, it returns a false and below is the message in the logcat:
I/dalvikvm(8477): Could not find method android.content.pm.PackageManager.getPackageInstaller, referenced from method com.google.android.gms.common.GooglePlayServicesUtil.zzh
W/dalvikvm(8477): VFY: unable to resolve virtual method 612: Landroid/content/pm/PackageManager;.getPackageInstaller ()Landroid/content/pm/PackageInstaller;
D/dalvikvm(8477): VFY: replacing opcode 0x6e at 0x000b
The target properties of GPS is 4.4.2.
If you have more questions just comment.
This must be a bug described here:
Issue 91424: Bug introduced with 'com.android.support:appcompat-v7:21.0.3'
update the support library to 22.1.0 or later!
I'm not sure where this error is generating from. My application works fine and I've not come across any crashing; however I receive the below in my LogCat.
My application uses an ActionBar and ListView. Anyone come across this before?
EDIT: Seems to be only happening when running on Android 2.x
Could not find method android.widget.LinearLayout$LayoutParams., referenced from method android.support.v7.internal.view.menu.ActionMenuView$LayoutParams.
VFY: unable to resolve direct method 8309: Landroid/widget/LinearLayout$LayoutParams;. (Landroid/widget/LinearLayout$LayoutParams;)V
VFY: replacing opcode 0x70 at 0x0000
VFY: dead code 0x0003-0007 in Landroid/support/v7/internal/view/menu/ActionMenuView$LayoutParams;. (Landroid/support/v7/internal/view/menu/ActionMenuView$LayoutParams;)V
This sounds like those classes are missing from your apk. Make sure to include the necessary Jars into your Apk (sounds like the support library).
Also in relation to this error, this is due to the Class Loader trying to resolve the reference in your code to actual operation codes (opcode) that the OS can recognize.
I had somewhat a similar issue. But later I found that I was trying to call a menu which does not exist.
I am getting this error:-
VFY: unable to resolve virtual method 4258: Landroid/view/View;.setAlpha (F)V, VFY: unable to resolve virtual method 4276: Landroid/view/View;.setTranslationX (F)V
this message in my logcat:-
Could not find method android.view.View.setTranslationX, referenced from method com.learning.animation.ZoomOutPageTransfer.transformPage.
I am trying to add ZoomOut page transfer animation using viewpager and for this I follow this link for Zoom out Page transfer, my application is running but it is not zooming out the page as it is shown in the above mentioned link to be.Please if anyone know the solution kindly tell.
Thank you in advance.
setTranslationX method is available only on android 3.0 ( api level 11) and up. Are sure you're using device/emulator with proper android version?
I try to implement a Backup Agent in my Android app, and I've got a weird issue every times it restore (at first launch) :
Unable to resolve superclass of Lcom/actionbarsherlock/app/SherlockMapActivity; (916)
Link of class 'Lcom/actionbarsherlock/app/SherlockMapActivity;' failed
Unable to resolve superclass of Lnet/myapp/activity/impl/MapActivity; (674)
Link of class 'Lnet/myapp/activity/impl/MapActivity;' failed
Could not find class 'net.myapp.activity.impl.MapActivity', referenced from method net.myapp.helper.SlidingMenuHelper.<clinit>
VFY: unable to resolve const-class 1520 (Lnet/myapp/activity/impl/MapActivity;) in Lnet/myapp/helper/SlidingMenuHelper;
VFY: replacing opcode 0x1c at 0x0081
Exception Ljava/lang/NoClassDefFoundError; thrown while initializing Lnet/myapp/helper/SlidingMenuHelper;
Complete log here : https://gist.github.com/romainguefveneu/1acc78cabbed65fba4b7
The restore process works just fine, when I open a second time the app, my data are correctly restored.
It seems to be an issue with the loading of SherlockMapActivity, I use all those libs in my project :
actionbarsherlock-plugin-maps-4.2.0.jar
bugsense-3.0.1.jar
commons-io-2.0.1.jar
gson-2.2.2.jar
joda-time-2.1.jar
ocpsoft-pretty-time-1.0.7.jar
Does someone has an idea ?
Everything was working fine in my app. Then, I did a small refactoring and a key component stopped working. When I looked at the LogCat output, this is what I found:
WARN/dalvikvm(488): VFY: unable to resolve virtual method 10830: Ljava/lang/String;.getBytes (Ljava/nio/charset/Charset;)[B
DEBUG/dalvikvm(488): VFY: replacing opcode 0x6e at 0x000e
DEBUG/dalvikvm(488): VFY: dead code 0x0011-0015 in Lcom/appiancorp/tempo/android/service/CommentXmlHttpMessageConverter;.writeInternal (Lcom/appiancorp/tempo/android/model/EntryComment;Lorg/springframework/http/HttpOutputMessage;)V
This was ... surprising, to say the least. I looked at the documentation and the method is there, what gives?
The getBytes(Charset) exists in API9 and later. Make sure you are building against this version of the SDK or use the getBytes(String charsetName) which exists in API1.
You can also you the "filter by API level" checkbox in online SDK documentation to gray out methods not available in the version you are building against.