Dalvik error in android programming

Hey guys i’m having this problem with my android app. Any help is much appreciated. Following is a description of the problem:-

I have a login form.
The user enters their username and password.
Then i send these as parameters to the server.
Serverside i have a php script that validates the user’s credentials.
If the user exists in the database the server sends a response true otherwise it sends a response false.
On the client side (android app) i check if the response is true or false.
If its true i log in the user by calling startActivity() and passing in the activity that logged in users should be able to see as an argument.
Trouble is once i test the app on the emulator it does not crash but it does the following.
Once i give it the correct username and password it just goes back to the login form instead of launching the activity that a logged in user should see.
On checking the stack trace i get that error that i’ve just posted a few minutes ago.

See stacktrace below:-

05-19 10:47:14.989 18723-18723/? D/dalvikvm: Late-enabling CheckJNI
05-19 10:47:15.069 18723-18723/edu.cuea.project.research.kura I/dalvikvm: Could not find method android.view.Window$Callback.onProvideKeyboardShortcuts, referenced from method android.support.v7.view.WindowCallbackWrapper.onProvideKeyboardShortcuts
05-19 10:47:15.069 18723-18723/edu.cuea.project.research.kura W/dalvikvm: VFY: unable to resolve interface method 17046: Landroid/view/Window$Callback;.onProvideKeyboardShortcuts (Ljava/util/List;Landroid/view/Menu;I)V
05-19 10:47:15.069 18723-18723/edu.cuea.project.research.kura D/dalvikvm: VFY: replacing opcode 0x72 at 0x0002
05-19 10:47:15.069 18723-18723/edu.cuea.project.research.kura W/dalvikvm: VFY: unable to find class referenced in signature (Landroid/view/SearchEvent;)
05-19 10:47:15.069 18723-18723/edu.cuea.project.research.kura I/dalvikvm: Could not find method android.view.Window$Callback.onSearchRequested, referenced from method android.support.v7.view.WindowCallbackWrapper.onSearchRequested
05-19 10:47:15.069 18723-18723/edu.cuea.project.research.kura W/dalvikvm: VFY: unable to resolve interface method 17048: Landroid/view/Window$Callback;.onSearchRequested (Landroid/view/SearchEvent;)Z
05-19 10:47:15.069 18723-18723/edu.cuea.project.research.kura D/dalvikvm: VFY: replacing opcode 0x72 at 0x0002
05-19 10:47:15.069 18723-18723/edu.cuea.project.research.kura I/dalvikvm: Could not find method android.view.Window$Callback.onWindowStartingActionMode, referenced from method android.support.v7.view.WindowCallbackWrapper.onWindowStartingActionMode
05-19 10:47:15.069 18723-18723/edu.cuea.project.research.kura W/dalvikvm: VFY: unable to resolve interface method 17052: Landroid/view/Window$Callback;.onWindowStartingActionMode (Landroid/view/ActionMode$Callback;I)Landroid/view/ActionMode;
05-19 10:47:15.069 18723-18723/edu.cuea.project.research.kura D/dalvikvm: VFY: replacing opcode 0x72 at 0x0002
05-19 10:47:15.069 18723-18723/edu.cuea.project.research.kura I/dalvikvm: Could not find method android.content.res.TypedArray.getChangingConfigurations, referenced from method android.support.v7.widget.TintTypedArray.getChangingConfigurations
05-19 10:47:15.069 18723-18723/edu.cuea.project.research.kura W/dalvikvm: VFY: unable to resolve virtual method 481: Landroid/content/res/TypedArray;.getChangingConfigurations ()I
05-19 10:47:15.069 18723-18723/edu.cuea.project.research.kura D/dalvikvm: VFY: replacing opcode 0x6e at 0x0002
05-19 10:47:15.069 18723-18723/edu.cuea.project.research.kura I/dalvikvm: Could not find method android.content.res.TypedArray.getType, referenced from method android.support.v7.widget.TintTypedArray.getType
05-19 10:47:15.069 18723-18723/edu.cuea.project.research.kura W/dalvikvm: VFY: unable to resolve virtual method 503: Landroid/content/res/TypedArray;.getType (I)I
05-19 10:47:15.069 18723-18723/edu.cuea.project.research.kura D/dalvikvm: VFY: replacing opcode 0x6e at 0x0008
05-19 10:47:15.079 18723-18723/edu.cuea.project.research.kura I/dalvikvm: Could not find method android.widget.FrameLayout.startActionModeForChild, referenced from method android.support.v7.widget.ActionBarContainer.startActionModeForChild
05-19 10:47:15.079 18723-18723/edu.cuea.project.research.kura W/dalvikvm: VFY: unable to resolve virtual method 17487: Landroid/widget/FrameLayout;.startActionModeForChild (Landroid/view/View;Landroid/view/ActionMode$Callback;I)Landroid/view/ActionMode;
05-19 10:47:15.079 18723-18723/edu.cuea.project.research.kura D/dalvikvm: VFY: replacing opcode 0x6f at 0x0002
05-19 10:47:15.079 18723-18723/edu.cuea.project.research.kura I/dalvikvm: Could not find method android.content.Context.getColorStateList, referenced from method android.support.v7.content.res.AppCompatResources.getColorStateList
05-19 10:47:15.079 18723-18723/edu.cuea.project.research.kura W/dalvikvm: VFY: unable to resolve virtual method 287: Landroid/content/Context;.getColorStateList (I)Landroid/content/res/ColorStateList;
05-19 10:47:15.079 18723-18723/edu.cuea.project.research.kura D/dalvikvm: VFY: replacing opcode 0x6e at 0x0006
05-19 10:47:15.079 18723-18723/edu.cuea.project.research.kura I/dalvikvm: Could not find method android.content.res.Resources.getDrawable, referenced from method android.support.v7.widget.ResourcesWrapper.getDrawable
05-19 10:47:15.079 18723-18723/edu.cuea.project.research.kura W/dalvikvm: VFY: unable to resolve virtual method 444: Landroid/content/res/Resources;.getDrawable (ILandroid/content/res/Resources$Theme;)Landroid/graphics/drawable/Drawable;
05-19 10:47:15.079 18723-18723/edu.cuea.project.research.kura D/dalvikvm: VFY: replacing opcode 0x6e at 0x0002
05-19 10:47:15.079 18723-18723/edu.cuea.project.research.kura I/dalvikvm: Could not find method android.content.res.Resources.getDrawableForDensity, referenced from method android.support.v7.widget.ResourcesWrapper.getDrawableForDensity
05-19 10:47:15.079 18723-18723/edu.cuea.project.research.kura W/dalvikvm: VFY: unable to resolve virtual method 446: Landroid/content/res/Resources;.getDrawableForDensity (IILandroid/content/res/Resources$Theme;)Landroid/graphics/drawable/Drawable;
05-19 10:47:15.079 18723-18723/edu.cuea.project.research.kura D/dalvikvm: VFY: replacing opcode 0x6e at 0x0002
05-19 10:47:15.149 18723-18723/edu.cuea.project.research.kura E/dalvikvm: Could not find class ‘android.graphics.drawable.RippleDrawable’, referenced from method android.support.v7.widget.AppCompatImageHelper.hasOverlappingRendering
05-19 10:47:15.149 18723-18723/edu.cuea.project.research.kura W/dalvikvm: VFY: unable to resolve instanceof 147 (Landroid/graphics/drawable/RippleDrawable;) in Landroid/support/v7/widget/AppCompatImageHelper;
05-19 10:47:15.149 18723-18723/edu.cuea.project.research.kura D/dalvikvm: VFY: replacing opcode 0x20 at 0x000c
05-19 10:47:15.369 18723-18723/edu.cuea.project.research.kura I/PGA: Attempting to create new SOCKET connectionn pid = 18723, tid = 18723
05-19 10:47:15.379 18723-18723/edu.cuea.project.research.kura I/PGA: New SOCKET connection: edu.cuea.project.research.kura (pid 18723, tid 18723)
05-19 10:48:04.039 18723-18723/edu.cuea.project.research.kura D/dalvikvm: GC_FOR_ALLOC freed 342K, 19% free 3048K/3720K, paused 0ms, total 0ms

I don’t see anything too alarming in that stack trace. Sometimes you will see warnings like these that aren’t necessarily an issue with your code.

What happens when the user logs in? Does the app appear to start a new activity (but it’s actually just the same activity) or does nothing happen? Feel free to post a code snippet.

Hey @cstewart thanks for the reply. After looking into it into i realized you are right. The problem wasn’t my code it was the android OS to be specific something about EGL_BAD_MATCH; i think its some graphics thing where the OS isn’t able to place the activity on the screen not sure though.

So what used to happen was when the user logged in the app went back to the log in screen i.e. it tried to load the next activity but remained at the log in screen.

Anyways i just worked around it by calling startActivity() and passing in another class as an argument (and i filled this class with what the user should see after logging in).

Thanks for caring though. If you have any literature on this you can share i’m not a kernel developer but i’d love to read up on it sounds interesting.

I’m glad you were able to figure it out.

I don’t have any articles to share about the problems you saw. From experience, if you see any errors/warnings in the logs with GL_... that means that there’s some kind of OpenGL (graphics) issue with the emulator. I do not believe you will see those messages on a real device.