Request Permissions exceptions in app - android

What does these exceptions really mean?I have already given the permission of Internet in manifest file.
05-02 15:21:31.019 6603-6603/com.example.somya.client_feedback_application I/dalvikvm: Could not find method android.app.Activity.requestPermissions, referenced from method com.example.somya.client_feedback_application.MainActivity.access$super
05-02 15:21:31.019 6603-6603/com.example.somya.client_feedback_application W/dalvikvm: VFY: unable to resolve virtual method 193: Landroid/app/Activity;.requestPermissions ([Ljava/lang/String;I)V
05-02 15:21:31.031 6603-6603/com.example.somya.client_feedback_application I/dalvikvm: Could not find method android.app.Activity.onRequestPermissionsResult, referenced from method com.example.somya.client_feedback_application.MainActivity.access$super
05-02 15:21:31.031 6603-6603/com.example.somya.client_feedback_application W/dalvikvm: VFY: unable to resolve virtual method 160: Landroid/app/Activity;.onRequestPermissionsResult (I[Ljava/lang/String;[I)V
05-02 15:21:31.031 6603-6603/com.example.somya.client_feedback_application I/dalvikvm: Could not find method android.app.Activity.requestVisibleBehind, referenced from method com.example.somya.client_feedback_application.MainActivity.access$super
05-02 15:21:31.031 6603-6603/com.example.somya.client_feedback_application W/dalvikvm: VFY: unable to resolve virtual method 194: Landroid/app/Activity;.requestVisibleBehind (Z)Z
05-02 15:21:31.031 6603-6603/com.example.somya.client_feedback_application I/dalvikvm: Could not find method android.app.Activity.shouldShowRequestPermissionRationale, referenced from method com.example.somya.client_feedback_application.MainActivity.access$super
05-02 15:21:31.031 6603-6603/com.example.somya.client_feedback_application W/dalvikvm: VFY: unable to resolve virtual method 227: Landroid/app/Activity;.shouldShowRequestPermissionRationale (Ljava/lang/String;)Z
LOGCAT after running the app-
05-02 15:21:31.019 6603-6603/com.example.somya.client_feedback_application I/dalvikvm: Could not find method android.app.Activity.requestPermissions, referenced from method com.example.somya.client_feedback_application.MainActivity.access$super
05-02 15:21:31.019 6603-6603/com.example.somya.client_feedback_application W/dalvikvm: VFY: unable to resolve virtual method 193: Landroid/app/Activity;.requestPermissions ([Ljava/lang/String;I)V
05-02 15:21:31.031 6603-6603/com.example.somya.client_feedback_application I/dalvikvm: Could not find method android.app.Activity.onRequestPermissionsResult, referenced from method com.example.somya.client_feedback_application.MainActivity.access$super
05-02 15:21:31.031 6603-6603/com.example.somya.client_feedback_application W/dalvikvm: VFY: unable to resolve virtual method 160: Landroid/app/Activity;.onRequestPermissionsResult (I[Ljava/lang/String;[I)V
05-02 15:21:31.031 6603-6603/com.example.somya.client_feedback_application I/dalvikvm: Could not find method android.app.Activity.requestVisibleBehind, referenced from method com.example.somya.client_feedback_application.MainActivity.access$super
05-02 15:21:31.031 6603-6603/com.example.somya.client_feedback_application W/dalvikvm: VFY: unable to resolve virtual method 194: Landroid/app/Activity;.requestVisibleBehind (Z)Z
05-02 15:21:31.031 6603-6603/com.example.somya.client_feedback_application I/dalvikvm: Could not find method android.app.Activity.shouldShowRequestPermissionRationale, referenced from method com.example.somya.client_feedback_application.MainActivity.access$super
05-02 15:21:31.031 6603-6603/com.example.somya.client_feedback_application W/dalvikvm: VFY: unable to resolve virtual method 227: Landroid/app/Activity;.shouldShowRequestPermissionRationale (Ljava/lang/String;)Z
05-02 15:53:47.830 16081-16081/com.example.somya.client_feedback_application I/dalvikvm: Could not find method android.app.Activity.requestPermissions, referenced from method com.example.somya.client_feedback_application.Login.access$super
05-02 15:53:47.830 16081-16081/com.example.somya.client_feedback_application W/dalvikvm: VFY: unable to resolve virtual method 193: Landroid/app/Activity;.requestPermissions ([Ljava/lang/String;I)V
05-02 15:53:47.834 16081-16081/com.example.somya.client_feedback_application I/dalvikvm: Could not find method android.app.Activity.onRequestPermissionsResult, referenced from method com.example.somya.client_feedback_application.Login.access$super
05-02 15:53:47.834 16081-16081/com.example.somya.client_feedback_application W/dalvikvm: VFY: unable to resolve virtual method 160: Landroid/app/Activity;.onRequestPermissionsResult (I[Ljava/lang/String;[I)V
05-02 15:53:47.834 16081-16081/com.example.somya.client_feedback_application I/dalvikvm: Could not find method android.app.Activity.requestVisibleBehind, referenced from method com.example.somya.client_feedback_application.Login.access$super
05-02 15:53:47.834 16081-16081/com.example.somya.client_feedback_application W/dalvikvm: VFY: unable to resolve virtual method 194: Landroid/app/Activity;.requestVisibleBehind (Z)Z
05-02 15:53:47.834 16081-16081/com.example.somya.client_feedback_application I/dalvikvm: Could not find method android.app.Activity.shouldShowRequestPermissionRationale, referenced from method com.example.somya.client_feedback_application.Login.access$super
05-02 15:53:47.834 16081-16081/com.example.somya.client_feedback_application W/dalvikvm: VFY: unable to resolve virtual method 227: Landroid/app/Activity;.shouldShowRequestPermissionRationale (Ljava/lang/String;)Z
05-02 15:54:04.238 16517-16517/com.example.somya.client_feedback_application I/dalvikvm: Could not find method android.app.Activity.requestPermissions, referenced from method com.example.somya.client_feedback_application.MainActivity.access$super
05-02 15:54:04.238 16517-16517/com.example.somya.client_feedback_application W/dalvikvm: VFY: unable to resolve virtual method 193: Landroid/app/Activity;.requestPermissions ([Ljava/lang/String;I)V
05-02 15:54:04.246 16517-16517/com.example.somya.client_feedback_application I/dalvikvm: Could not find method android.app.Activity.onRequestPermissionsResult, referenced from method com.example.somya.client_feedback_application.MainActivity.access$super
05-02 15:54:04.246 16517-16517/com.example.somya.client_feedback_application W/dalvikvm: VFY: unable to resolve virtual method 160: Landroid/app/Activity;.onRequestPermissionsResult (I[Ljava/lang/String;[I)V
05-02 15:54:04.246 16517-16517/com.example.somya.client_feedback_application I/dalvikvm: Could not find method android.app.Activity.requestVisibleBehind, referenced from method com.example.somya.client_feedback_application.MainActivity.access$super
05-02 15:54:04.246 16517-16517/com.example.somya.client_feedback_application W/dalvikvm: VFY: unable to resolve virtual method 194: Landroid/app/Activity;.requestVisibleBehind (Z)Z
05-02 15:54:04.246 16517-16517/com.example.somya.client_feedback_application I/dalvikvm: Could not find method android.app.Activity.shouldShowRequestPermissionRationale, referenced from method com.example.somya.client_feedback_application.MainActivity.access$super
05-02 15:54:04.246 16517-16517/com.example.somya.client_feedback_application W/dalvikvm: VFY: unable to resolve virtual method 227: Landroid/app/Activity;.shouldShowRequestPermissionRationale (Ljava/lang/String;)Z

Those are not exceptions. They are messages from the runtime, indicating that your code refers to classes or methods that do not appear to exist on the version of Android you are running on. This is typical if you are using Build.VERSION.SDK_INT to conditionally execute code on newer devices and skip that code on older devices.

Related

Create a function to add .error to EditText

I have an app with many EditText, I want to make a function to add errors to them, for example, if a particular EditText.lenght() == 0, then it has to set an error "Error, field must not be empty" or so.
What I've tried
I have a function:
fun errorEmpty(et: EditText) {
if(et.length() > 0)
et.error = null
else {
et.error = "Error, field must not be empty"
et.requestFocus()
}
}
This one breaks the app:
var et = someEditText
errorEmpty(et)
This is the log for the last one
05-17 17:53:18.841 21899-21899/? D/dalvikvm: Late-enabling CheckJNI
05-17 17:53:19.091 21899-21899/com.example.name.exampleapp I/dalvikvm: Could not find method android.view.Window$Callback.onPointerCaptureChanged, referenced from method android.support.v7.view.WindowCallbackWrapper.onPointerCaptureChanged
05-17 17:53:19.091 21899-21899/com.example.name.exampleapp W/dalvikvm: VFY: unable to resolve interface method 21221: Landroid/view/Window$Callback;.onPointerCaptureChanged (Z)V
05-17 17:53:19.091 21899-21899/com.example.name.exampleapp D/dalvikvm: VFY: replacing opcode 0x72 at 0x0002
05-17 17:53:19.091 21899-21899/com.example.name.exampleapp I/dalvikvm: Could not find method android.view.Window$Callback.onProvideKeyboardShortcuts, referenced from method android.support.v7.view.WindowCallbackWrapper.onProvideKeyboardShortcuts
05-17 17:53:19.091 21899-21899/com.example.name.exampleapp W/dalvikvm: VFY: unable to resolve interface method 21223: Landroid/view/Window$Callback;.onProvideKeyboardShortcuts (Ljava/util/List;Landroid/view/Menu;I)V
05-17 17:53:19.091 21899-21899/com.example.name.exampleapp D/dalvikvm: VFY: replacing opcode 0x72 at 0x0002
05-17 17:53:19.101 21899-21899/com.example.name.exampleapp W/dalvikvm: VFY: unable to find class referenced in signature (Landroid/view/SearchEvent;)
05-17 17:53:19.101 21899-21899/com.example.name.exampleapp I/dalvikvm: Could not find method android.view.Window$Callback.onSearchRequested, referenced from method android.support.v7.view.WindowCallbackWrapper.onSearchRequested
05-17 17:53:19.101 21899-21899/com.example.name.exampleapp W/dalvikvm: VFY: unable to resolve interface method 21225: Landroid/view/Window$Callback;.onSearchRequested (Landroid/view/SearchEvent;)Z
05-17 17:53:19.101 21899-21899/com.example.name.exampleapp D/dalvikvm: VFY: replacing opcode 0x72 at 0x0002
05-17 17:53:19.101 21899-21899/com.example.name.exampleapp I/dalvikvm: Could not find method android.view.Window$Callback.onWindowStartingActionMode, referenced from method android.support.v7.view.WindowCallbackWrapper.onWindowStartingActionMode
05-17 17:53:19.101 21899-21899/com.example.name.exampleapp W/dalvikvm: VFY: unable to resolve interface method 21229: Landroid/view/Window$Callback;.onWindowStartingActionMode (Landroid/view/ActionMode$Callback;I)Landroid/view/ActionMode;
05-17 17:53:19.101 21899-21899/com.example.name.exampleapp D/dalvikvm: VFY: replacing opcode 0x72 at 0x0002
05-17 17:53:19.101 21899-21899/com.example.name.exampleapp I/dalvikvm: Could not find method android.content.res.TypedArray.getChangingConfigurations, referenced from method android.support.v7.widget.TintTypedArray.getChangingConfigurations
05-17 17:53:19.101 21899-21899/com.example.name.exampleapp W/dalvikvm: VFY: unable to resolve virtual method 747: Landroid/content/res/TypedArray;.getChangingConfigurations ()I
05-17 17:53:19.101 21899-21899/com.example.name.exampleapp D/dalvikvm: VFY: replacing opcode 0x6e at 0x0002
05-17 17:53:19.101 21899-21899/com.example.name.exampleapp I/dalvikvm: Could not find method android.content.res.TypedArray.getType, referenced from method android.support.v7.widget.TintTypedArray.getType
05-17 17:53:19.101 21899-21899/com.example.name.exampleapp W/dalvikvm: VFY: unable to resolve virtual method 769: Landroid/content/res/TypedArray;.getType (I)I
05-17 17:53:19.101 21899-21899/com.example.name.exampleapp D/dalvikvm: VFY: replacing opcode 0x6e at 0x0008
05-17 17:53:19.101 21899-21919/com.example.name.exampleapp E/Qmage: onDecode : QmageDecodeFrame 20140421 Rev.6376
This is decoding
decoding stream->hasLength()
onDecode : QmageDecParseHeader call : QM
Qmage parsing for decoding ok
onDecode : QmageHeader.NinePatched 0
onDecode : QmageHeader Height() 12 Width() : 522 sampleSize : 1
Qmage Make Color table
SkBitmap::kIndex8_Config == config && 1 == sampleSize
onDecode : return true QM
05-17 17:53:19.111 21899-21899/com.example.name.exampleapp I/dalvikvm: Could not find method android.content.Context.createDeviceProtectedStorageContext, referenced from method android.support.v4.content.ContextCompat.createDeviceProtectedStorageContext
05-17 17:53:19.111 21899-21899/com.example.name.exampleapp W/dalvikvm: VFY: unable to resolve virtual method 527: Landroid/content/Context;.createDeviceProtectedStorageContext ()Landroid/content/Context;
05-17 17:53:19.111 21899-21899/com.example.name.exampleapp D/dalvikvm: VFY: replacing opcode 0x6e at 0x0006
05-17 17:53:19.111 21899-21899/com.example.name.exampleapp I/dalvikvm: Could not find method android.content.Context.getCodeCacheDir, referenced from method android.support.v4.content.ContextCompat.getCodeCacheDir
05-17 17:53:19.111 21899-21899/com.example.name.exampleapp W/dalvikvm: VFY: unable to resolve virtual method 533: Landroid/content/Context;.getCodeCacheDir ()Ljava/io/File;
05-17 17:53:19.111 21899-21920/com.example.name.exampleapp E/Qmage: onDecode : QmageDecodeFrame 20140421 Rev.6376
05-17 17:53:19.111 21899-21899/com.example.name.exampleapp D/dalvikvm: VFY: replacing opcode 0x6e at 0x0006
05-17 17:53:19.111 21899-21920/com.example.name.exampleapp E/Qmage: This is decoding
decoding stream->hasLength()
05-17 17:53:19.111 21899-21899/com.example.name.exampleapp I/dalvikvm: Could not find method android.content.Context.getColor, referenced from method android.support.v4.content.ContextCompat.getColor
05-17 17:53:19.111 21899-21899/com.example.name.exampleapp W/dalvikvm: VFY: unable to resolve virtual method 534: Landroid/content/Context;.getColor (I)I
05-17 17:53:19.111 21899-21899/com.example.name.exampleapp D/dalvikvm: VFY: replacing opcode 0x6e at 0x0006
05-17 17:53:19.111 21899-21899/com.example.name.exampleapp I/dalvikvm: Could not find method android.content.Context.getColorStateList, referenced from method android.support.v4.content.ContextCompat.getColorStateList
05-17 17:53:19.111 21899-21899/com.example.name.exampleapp W/dalvikvm: VFY: unable to resolve virtual method 535: Landroid/content/Context;.getColorStateList (I)Landroid/content/res/ColorStateList;
05-17 17:53:19.111 21899-21899/com.example.name.exampleapp D/dalvikvm: VFY: replacing opcode 0x6e at 0x0006
05-17 17:53:19.111 21899-21899/com.example.name.exampleapp I/dalvikvm: Could not find method android.content.Context.getDataDir, referenced from method android.support.v4.content.ContextCompat.getDataDir
05-17 17:53:19.111 21899-21899/com.example.name.exampleapp W/dalvikvm: VFY: unable to resolve virtual method 537: Landroid/content/Context;.getDataDir ()Ljava/io/File;
05-17 17:53:19.111 21899-21899/com.example.name.exampleapp D/dalvikvm: VFY: replacing opcode 0x6e at 0x0006
05-17 17:53:19.111 21899-21899/com.example.name.exampleapp I/dalvikvm: Could not find method android.content.Context.getDrawable, referenced from method android.support.v4.content.ContextCompat.getDrawable
05-17 17:53:19.111 21899-21899/com.example.name.exampleapp W/dalvikvm: VFY: unable to resolve virtual method 538: Landroid/content/Context;.getDrawable (I)Landroid/graphics/drawable/Drawable;
05-17 17:53:19.111 21899-21899/com.example.name.exampleapp D/dalvikvm: VFY: replacing opcode 0x6e at 0x0006
05-17 17:53:19.111 21899-21899/com.example.name.exampleapp I/dalvikvm: Could not find method android.content.Context.getNoBackupFilesDir, referenced from method android.support.v4.content.ContextCompat.getNoBackupFilesDir
05-17 17:53:19.111 21899-21899/com.example.name.exampleapp W/dalvikvm: VFY: unable to resolve virtual method 545: Landroid/content/Context;.getNoBackupFilesDir ()Ljava/io/File;
05-17 17:53:19.111 21899-21899/com.example.name.exampleapp D/dalvikvm: VFY: replacing opcode 0x6e at 0x0006
05-17 17:53:19.111 21899-21899/com.example.name.exampleapp I/dalvikvm: Could not find method android.content.Context.isDeviceProtectedStorage, referenced from method android.support.v4.content.ContextCompat.isDeviceProtectedStorage
05-17 17:53:19.111 21899-21899/com.example.name.exampleapp W/dalvikvm: VFY: unable to resolve virtual method 558: Landroid/content/Context;.isDeviceProtectedStorage ()Z
05-17 17:53:19.111 21899-21899/com.example.name.exampleapp D/dalvikvm: VFY: replacing opcode 0x6e at 0x0006
05-17 17:53:19.111 21899-21899/com.example.name.exampleapp I/dalvikvm: Could not find method android.content.Context.startForegroundService, referenced from method android.support.v4.content.ContextCompat.startForegroundService
05-17 17:53:19.111 21899-21899/com.example.name.exampleapp W/dalvikvm: VFY: unable to resolve virtual method 573: Landroid/content/Context;.startForegroundService (Landroid/content/Intent;)Landroid/content/ComponentName;
05-17 17:53:19.111 21899-21899/com.example.name.exampleapp D/dalvikvm: VFY: replacing opcode 0x6e at 0x0006
05-17 17:53:19.111 21899-21920/com.example.name.exampleapp E/Qmage: onDecode : QmageDecParseHeader call : QM
Qmage parsing for decoding ok
onDecode : QmageHeader.NinePatched 0
onDecode : QmageHeader Height() 135 Width() : 522 sampleSize : 1
normal image decoding
onDecode : QmageDecodeFrame call : QM
05-17 17:53:19.161 21899-21899/com.example.name.exampleapp I/dalvikvm: Could not find method android.support.design.widget.AppBarLayout.setKeyboardNavigationCluster, referenced from method android.support.design.widget.AppBarLayout.<init>
05-17 17:53:19.161 21899-21899/com.example.name.exampleapp W/dalvikvm: VFY: unable to resolve virtual method 3053: Landroid/support/design/widget/AppBarLayout;.setKeyboardNavigationCluster (Z)V
05-17 17:53:19.161 21899-21899/com.example.name.exampleapp D/dalvikvm: VFY: replacing opcode 0x6e at 0x006e
05-17 17:53:19.161 21899-21899/com.example.name.exampleapp I/dalvikvm: Could not find method android.support.design.widget.AppBarLayout.setTouchscreenBlocksFocus, referenced from method android.support.design.widget.AppBarLayout.<init>
05-17 17:53:19.161 21899-21899/com.example.name.exampleapp W/dalvikvm: VFY: unable to resolve virtual method 3056: Landroid/support/design/widget/AppBarLayout;.setTouchscreenBlocksFocus (Z)V
05-17 17:53:19.161 21899-21899/com.example.name.exampleapp D/dalvikvm: VFY: replacing opcode 0x6e at 0x007f
05-17 17:53:19.181 21899-21899/com.example.name.exampleapp I/dalvikvm: Could not find method android.content.Context.getColorStateList, referenced from method android.support.v7.content.res.AppCompatResources.getColorStateList
05-17 17:53:19.181 21899-21899/com.example.name.exampleapp W/dalvikvm: VFY: unable to resolve virtual method 535: Landroid/content/Context;.getColorStateList (I)Landroid/content/res/ColorStateList;
05-17 17:53:19.181 21899-21899/com.example.name.exampleapp D/dalvikvm: VFY: replacing opcode 0x6e at 0x0006
05-17 17:53:19.181 21899-21920/com.example.name.exampleapp E/Qmage: onDecode : return true QM
05-17 17:53:19.201 21899-21899/com.example.name.exampleapp E/dalvikvm: Could not find class 'android.graphics.drawable.RippleDrawable', referenced from method android.support.v7.widget.AppCompatImageHelper.hasOverlappingRendering
05-17 17:53:19.201 21899-21899/com.example.name.exampleapp W/dalvikvm: VFY: unable to resolve instanceof 206 (Landroid/graphics/drawable/RippleDrawable;) in Landroid/support/v7/widget/AppCompatImageHelper;
05-17 17:53:19.201 21899-21899/com.example.name.exampleapp D/dalvikvm: VFY: replacing opcode 0x20 at 0x000c
05-17 17:53:19.221 21899-21899/com.example.name.exampleapp W/dalvikvm: VFY: unable to find class referenced in signature (Landroid/graphics/drawable/Icon;)
05-17 17:53:19.221 21899-21899/com.example.name.exampleapp I/dalvikvm: Could not find method android.widget.ImageButton.setImageIcon, referenced from method android.support.v7.widget.AppCompatImageButton.setImageIcon
05-17 17:53:19.221 21899-21899/com.example.name.exampleapp W/dalvikvm: VFY: unable to resolve virtual method 21769: Landroid/widget/ImageButton;.setImageIcon (Landroid/graphics/drawable/Icon;)V
05-17 17:53:19.221 21899-21899/com.example.name.exampleapp D/dalvikvm: VFY: replacing opcode 0x6f at 0x0000
05-17 17:53:19.221 21899-21899/com.example.name.exampleapp I/dalvikvm: Could not find method android.content.res.Resources.getDrawable, referenced from method android.support.v7.widget.ResourcesWrapper.getDrawable
05-17 17:53:19.221 21899-21899/com.example.name.exampleapp W/dalvikvm: VFY: unable to resolve virtual method 710: Landroid/content/res/Resources;.getDrawable (ILandroid/content/res/Resources$Theme;)Landroid/graphics/drawable/Drawable;
05-17 17:53:19.221 21899-21899/com.example.name.exampleapp D/dalvikvm: VFY: replacing opcode 0x6e at 0x0002
05-17 17:53:19.221 21899-21899/com.example.name.exampleapp I/dalvikvm: Could not find method android.content.res.Resources.getDrawableForDensity, referenced from method android.support.v7.widget.ResourcesWrapper.getDrawableForDensity
05-17 17:53:19.221 21899-21899/com.example.name.exampleapp W/dalvikvm: VFY: unable to resolve virtual method 712: Landroid/content/res/Resources;.getDrawableForDensity (IILandroid/content/res/Resources$Theme;)Landroid/graphics/drawable/Drawable;
05-17 17:53:19.221 21899-21899/com.example.name.exampleapp D/dalvikvm: VFY: replacing opcode 0x6e at 0x0002
05-17 17:53:19.221 21899-21899/com.example.name.exampleapp I/dalvikvm: Could not find method android.widget.TextView.getAutoSizeMaxTextSize, referenced from method android.support.v7.widget.AppCompatTextView.getAutoSizeMaxTextSize
05-17 17:53:19.221 21899-21899/com.example.name.exampleapp W/dalvikvm: VFY: unable to resolve virtual method 22111: Landroid/widget/TextView;.getAutoSizeMaxTextSize ()I
05-17 17:53:19.231 21899-21899/com.example.name.exampleapp D/dalvikvm: VFY: replacing opcode 0x6f at 0x0006
05-17 17:53:19.231 21899-21899/com.example.name.exampleapp I/dalvikvm: Could not find method android.widget.TextView.getAutoSizeMinTextSize, referenced from method android.support.v7.widget.AppCompatTextView.getAutoSizeMinTextSize
05-17 17:53:19.231 21899-21899/com.example.name.exampleapp W/dalvikvm: VFY: unable to resolve virtual method 22112: Landroid/widget/TextView;.getAutoSizeMinTextSize ()I
05-17 17:53:19.231 21899-21899/com.example.name.exampleapp D/dalvikvm: VFY: replacing opcode 0x6f at 0x0006
05-17 17:53:19.231 21899-21899/com.example.name.exampleapp I/dalvikvm: Could not find method android.widget.TextView.getAutoSizeStepGranularity, referenced from method android.support.v7.widget.AppCompatTextView.getAutoSizeStepGranularity
05-17 17:53:19.231 21899-21899/com.example.name.exampleapp W/dalvikvm: VFY: unable to resolve virtual method 22113: Landroid/widget/TextView;.getAutoSizeStepGranularity ()I
05-17 17:53:19.231 21899-21899/com.example.name.exampleapp D/dalvikvm: VFY: replacing opcode 0x6f at 0x0006
05-17 17:53:19.231 21899-21899/com.example.name.exampleapp I/dalvikvm: Could not find method android.widget.TextView.getAutoSizeTextAvailableSizes, referenced from method android.support.v7.widget.AppCompatTextView.getAutoSizeTextAvailableSizes
05-17 17:53:19.231 21899-21899/com.example.name.exampleapp W/dalvikvm: VFY: unable to resolve virtual method 22114: Landroid/widget/TextView;.getAutoSizeTextAvailableSizes ()[I
05-17 17:53:19.231 21899-21899/com.example.name.exampleapp D/dalvikvm: VFY: replacing opcode 0x6f at 0x0006
05-17 17:53:19.231 21899-21899/com.example.name.exampleapp I/dalvikvm: Could not find method android.widget.TextView.getAutoSizeTextType, referenced from method android.support.v7.widget.AppCompatTextView.getAutoSizeTextType
05-17 17:53:19.231 21899-21899/com.example.name.exampleapp W/dalvikvm: VFY: unable to resolve virtual method 22115: Landroid/widget/TextView;.getAutoSizeTextType ()I
05-17 17:53:19.231 21899-21899/com.example.name.exampleapp D/dalvikvm: VFY: replacing opcode 0x6f at 0x0007
05-17 17:53:19.231 21899-21899/com.example.name.exampleapp I/dalvikvm: Could not find method android.widget.TextView.setAutoSizeTextTypeUniformWithConfiguration, referenced from method android.support.v7.widget.AppCompatTextView.setAutoSizeTextTypeUniformWithConfiguration
05-17 17:53:19.231 21899-21899/com.example.name.exampleapp W/dalvikvm: VFY: unable to resolve virtual method 22165: Landroid/widget/TextView;.setAutoSizeTextTypeUniformWithConfiguration (IIII)V
05-17 17:53:19.231 21899-21899/com.example.name.exampleapp D/dalvikvm: VFY: replacing opcode 0x6f at 0x0006
05-17 17:53:19.231 21899-21899/com.example.name.exampleapp I/dalvikvm: Could not find method android.widget.TextView.setAutoSizeTextTypeUniformWithPresetSizes, referenced from method android.support.v7.widget.AppCompatTextView.setAutoSizeTextTypeUniformWithPresetSizes
05-17 17:53:19.231 21899-21899/com.example.name.exampleapp W/dalvikvm: VFY: unable to resolve virtual method 22166: Landroid/widget/TextView;.setAutoSizeTextTypeUniformWithPresetSizes ([II)V
05-17 17:53:19.231 21899-21899/com.example.name.exampleapp D/dalvikvm: VFY: replacing opcode 0x6f at 0x0006
05-17 17:53:19.231 21899-21899/com.example.name.exampleapp I/dalvikvm: Could not find method android.widget.TextView.setAutoSizeTextTypeWithDefaults, referenced from method android.support.v7.widget.AppCompatTextView.setAutoSizeTextTypeWithDefaults
05-17 17:53:19.231 21899-21899/com.example.name.exampleapp W/dalvikvm: VFY: unable to resolve virtual method 22167: Landroid/widget/TextView;.setAutoSizeTextTypeWithDefaults (I)V
05-17 17:53:19.231 21899-21899/com.example.name.exampleapp D/dalvikvm: VFY: replacing opcode 0x6f at 0x0006
05-17 17:53:19.241 21899-21899/com.example.name.exampleapp I/dalvikvm: Could not find method android.widget.TextView.getAutoSizeStepGranularity, referenced from method android.support.v7.widget.AppCompatTextHelper.loadFromAttributes
05-17 17:53:19.241 21899-21899/com.example.name.exampleapp W/dalvikvm: VFY: unable to resolve virtual method 22113: Landroid/widget/TextView;.getAutoSizeStepGranularity ()I
05-17 17:53:19.241 21899-21899/com.example.name.exampleapp D/dalvikvm: VFY: replacing opcode 0x6e at 0x0163
05-17 17:53:19.241 21899-21899/com.example.name.exampleapp I/dalvikvm: Could not find method android.text.StaticLayout$Builder.obtain, referenced from method android.support.v7.widget.AppCompatTextViewAutoSizeHelper.createStaticLayoutForMeasuring
05-17 17:53:19.241 21899-21899/com.example.name.exampleapp W/dalvikvm: VFY: unable to resolve static method 20411: Landroid/text/StaticLayout$Builder;.obtain (Ljava/lang/CharSequence;IILandroid/text/TextPaint;I)Landroid/text/StaticLayout$Builder;
05-17 17:53:19.241 21899-21899/com.example.name.exampleapp D/dalvikvm: VFY: replacing opcode 0x71 at 0x0014
05-17 17:53:19.311 21899-21899/com.example.name.exampleapp D/GC: <tid=21899> OES20 ===> GC Version : GC Ver rls_pxa988_KK44_GC13.20
05-17 17:53:19.361 21899-21899/com.example.name.exampleapp D/OpenGLRenderer: Enabling debug mode 0
05-17 17:53:19.391 21899-21899/com.example.name.exampleapp W/dalvikvm: VFY: unable to find class referenced in signature (Landroid/graphics/drawable/Icon;)
05-17 17:53:19.391 21899-21899/com.example.name.exampleapp I/dalvikvm: Could not find method android.widget.ImageView.setImageIcon, referenced from method android.support.v7.widget.AppCompatImageView.setImageIcon
05-17 17:53:19.391 21899-21899/com.example.name.exampleapp W/dalvikvm: VFY: unable to resolve virtual method 21814: Landroid/widget/ImageView;.setImageIcon (Landroid/graphics/drawable/Icon;)V
05-17 17:53:19.391 21899-21899/com.example.name.exampleapp D/dalvikvm: VFY: replacing opcode 0x6f at 0x0000
This one just doesn't do anything (it does not break the app):
errrorEmpty(someEditText)
Thanks in advance!
EDIT:
I've also tried:
fun errorEmpty(et: EditText): EditText {
if(et.length() > 0)
et.error = null
else {
et.error = "Error, field must not be empty"
et.requestFocus()
}
}return et
And then assigned the result to an EditText:
et = errorEmpty(et)
and it also breaks the app, this is the log:
05-17 18:46:38.262 22870-22870/com.example.name.exampleapp D/dalvikvm: VFY: replacing opcode 0x71 at 0x0014
05-17 18:46:38.322 22870-22890/com.example.name.exampleapp E/Qmage: onDecode : QmageDecodeFrame 20140421 Rev.6376
This is decoding
decoding stream->hasLength()
onDecode : QmageDecParseHeader call : QM
Qmage parsing for decoding ok
onDecode : QmageHeader.NinePatched 0
onDecode : QmageHeader Height() 12 Width() : 522 sampleSize : 1
Qmage Make Color table
SkBitmap::kIndex8_Config == config && 1 == sampleSize
onDecode : return true QM
05-17 18:46:38.322 22870-22891/com.example.name.exampleapp E/Qmage: onDecode : QmageDecodeFrame 20140421 Rev.6376
05-17 18:46:38.342 22870-22891/com.example.name.exampleapp E/Qmage: This is decoding
decoding stream->hasLength()
05-17 18:46:38.352 22870-22870/com.example.name.exampleapp D/GC: <tid=22870> OES20 ===> GC Version : GC Ver rls_pxa988_KK44_GC13.20
05-17 18:46:38.352 22870-22891/com.example.name.exampleapp E/Qmage: onDecode : QmageDecParseHeader call : QM
05-17 18:46:38.362 22870-22891/com.example.name.exampleapp E/Qmage: Qmage parsing for decoding ok
onDecode : QmageHeader.NinePatched 0
onDecode : QmageHeader Height() 135 Width() : 522 sampleSize : 1
05-17 18:46:38.453 22870-22870/com.example.name.exampleapp D/OpenGLRenderer: Enabling debug mode 0
05-17 18:46:38.483 22870-22891/com.example.name.exampleapp E/Qmage: normal image decoding
onDecode : QmageDecodeFrame call : QM
05-17 18:46:38.533 22870-22870/com.example.name.exampleapp W/dalvikvm: VFY: unable to find class referenced in signature (Landroid/graphics/drawable/Icon;)
05-17 18:46:38.533 22870-22870/com.example.name.exampleapp I/dalvikvm: Could not find method android.widget.ImageView.setImageIcon, referenced from method android.support.v7.widget.AppCompatImageView.setImageIcon
05-17 18:46:38.543 22870-22870/com.example.name.exampleapp W/dalvikvm: VFY: unable to resolve virtual method 21814: Landroid/widget/ImageView;.setImageIcon (Landroid/graphics/drawable/Icon;)V
05-17 18:46:38.543 22870-22870/com.example.name.exampleapp D/dalvikvm: VFY: replacing opcode 0x6f at 0x0000
05-17 18:46:38.813 22870-22891/com.example.name.exampleapp E/Qmage: onDecode : return true QM
(I'm only posting what I think is the important part because of character restrictions)

Run an Android App

Can anyone kindly help me, please with this error?
07-06 21:22:04.794 8489-8489/? D/dalvikvm: Late-enabling CheckJNI
07-06 21:22:04.944 8489-8489/? I/dalvikvm: Could not find method android.view.Window$Callback.onProvideKeyboardShortcuts, referenced from method android.support.v7.view.WindowCallbackWrapper.onProvideKeyboardShortcuts
07-06 21:22:04.944 8489-8489/? W/dalvikvm: VFY: unable to resolve interface method 15403: Landroid/view/Window$Callback;.onProvideKeyboardShortcuts (Ljava/util/List;Landroid/view/Menu;I)V
07-06 21:22:04.944 8489-8489/? D/dalvikvm: VFY: replacing opcode 0x72 at 0x0002
07-06 21:22:04.944 8489-8489/? W/dalvikvm: VFY: unable to find class referenced in signature (Landroid/view/SearchEvent;)
07-06 21:22:04.944 8489-8489/? I/dalvikvm: Could not find method android.view.Window$Callback.onSearchRequested, referenced from method android.support.v7.view.WindowCallbackWrapper.onSearchRequested
07-06 21:22:04.944 8489-8489/? W/dalvikvm: VFY: unable to resolve interface method 15405: Landroid/view/Window$Callback;.onSearchRequested (Landroid/view/SearchEvent;)Z
07-06 21:22:04.944 8489-8489/? D/dalvikvm: VFY: replacing opcode 0x72 at 0x0002
07-06 21:22:04.944 8489-8489/? I/dalvikvm: Could not find method android.view.Window$Callback.onWindowStartingActionMode, referenced from method android.support.v7.view.WindowCallbackWrapper.onWindowStartingActionMode
07-06 21:22:04.944 8489-8489/? W/dalvikvm: VFY: unable to resolve interface method 15409: Landroid/view/Window$Callback;.onWindowStartingActionMode (Landroid/view/ActionMode$Callback;I)Landroid/view/ActionMode;
07-06 21:22:04.944 8489-8489/? D/dalvikvm: VFY: replacing opcode 0x72 at 0x0002
07-06 21:22:04.954 8489-8489/? I/dalvikvm: Could not find method android.content.res.TypedArray.getChangingConfigurations, referenced from method android.support.v7.widget.TintTypedArray.getChangingConfigurations
07-06 21:22:04.954 8489-8489/? W/dalvikvm: VFY: unable to resolve virtual method 477: Landroid/content/res/TypedArray;.getChangingConfigurations ()I
07-06 21:22:04.954 8489-8489/? D/dalvikvm: VFY: replacing opcode 0x6e at 0x0002
07-06 21:22:04.954 8489-8489/? I/dalvikvm: Could not find method android.content.res.TypedArray.getType, referenced from method android.support.v7.widget.TintTypedArray.getType
07-06 21:22:04.954 8489-8489/? W/dalvikvm: VFY: unable to resolve virtual method 499: Landroid/content/res/TypedArray;.getType (I)I
07-06 21:22:04.954 8489-8489/? D/dalvikvm: VFY: replacing opcode 0x6e at 0x0008
07-06 21:22:04.954 8489-8489/? I/dalvikvm: Could not find method android.content.Context.createDeviceProtectedStorageContext, referenced from method android.support.v4.content.ContextCompat.createDeviceProtectedStorageContext
07-06 21:22:04.954 8489-8489/? W/dalvikvm: VFY: unable to resolve virtual method 268: Landroid/content/Context;.createDeviceProtectedStorageContext ()Landroid/content/Context;
07-06 21:22:04.954 8489-8489/? D/dalvikvm: VFY: replacing opcode 0x6e at 0x0006
07-06 21:22:04.954 8489-8489/? I/dalvikvm: Could not find method android.content.Context.getCodeCacheDir, referenced from method android.support.v4.content.ContextCompat.getCodeCacheDir
07-06 21:22:04.954 8489-8489/? W/dalvikvm: VFY: unable to resolve virtual method 273: Landroid/content/Context;.getCodeCacheDir ()Ljava/io/File;
07-06 21:22:04.954 8489-8489/? D/dalvikvm: VFY: replacing opcode 0x6e at 0x0006
07-06 21:22:04.954 8489-8489/? I/dalvikvm: Could not find method android.content.Context.getColor, referenced from method android.support.v4.content.ContextCompat.getColor
07-06 21:22:04.964 8489-8489/? W/dalvikvm: VFY: unable to resolve virtual method 274: Landroid/content/Context;.getColor (I)I
07-06 21:22:04.964 8489-8489/? D/dalvikvm: VFY: replacing opcode 0x6e at 0x0006
07-06 21:22:04.964 8489-8489/? I/dalvikvm: Could not find method android.content.Context.getColorStateList, referenced from method android.support.v4.content.ContextCompat.getColorStateList
07-06 21:22:04.964 8489-8489/? W/dalvikvm: VFY: unable to resolve virtual method 275: Landroid/content/Context;.getColorStateList (I)Landroid/content/res/ColorStateList;
07-06 21:22:04.964 8489-8489/? D/dalvikvm: VFY: replacing opcode 0x6e at 0x0006
07-06 21:22:04.964 8489-8489/? I/dalvikvm: Could not find method android.content.Context.getDataDir, referenced from method android.support.v4.content.ContextCompat.getDataDir
07-06 21:22:04.964 8489-8489/? W/dalvikvm: VFY: unable to resolve virtual method 277: Landroid/content/Context;.getDataDir ()Ljava/io/File;
07-06 21:22:04.964 8489-8489/? D/dalvikvm: VFY: replacing opcode 0x6e at 0x0006
07-06 21:22:04.964 8489-8489/? I/dalvikvm: Could not find method android.content.Context.getDrawable, referenced from method android.support.v4.content.ContextCompat.getDrawable
07-06 21:22:04.964 8489-8489/? W/dalvikvm: VFY: unable to resolve virtual method 278: Landroid/content/Context;.getDrawable (I)Landroid/graphics/drawable/Drawable;
07-06 21:22:04.964 8489-8489/? D/dalvikvm: VFY: replacing opcode 0x6e at 0x0006
07-06 21:22:04.964 8489-8489/? I/dalvikvm: Could not find method android.content.Context.getNoBackupFilesDir, referenced from method android.support.v4.content.ContextCompat.getNoBackupFilesDir
07-06 21:22:04.964 8489-8489/? W/dalvikvm: VFY: unable to resolve virtual method 285: Landroid/content/Context;.getNoBackupFilesDir ()Ljava/io/File;
07-06 21:22:04.964 8489-8489/? D/dalvikvm: VFY: replacing opcode 0x6e at 0x0006
07-06 21:22:04.964 8489-8489/? I/dalvikvm: Could not find method android.content.Context.isDeviceProtectedStorage, referenced from method android.support.v4.content.ContextCompat.isDeviceProtectedStorage
07-06 21:22:04.964 8489-8489/? W/dalvikvm: VFY: unable to resolve virtual method 298: Landroid/content/Context;.isDeviceProtectedStorage ()Z
07-06 21:22:04.964 8489-8489/? D/dalvikvm: VFY: replacing opcode 0x6e at 0x0006
07-06 21:22:04.984 8489-8489/? D/AndroidRuntime: Shutting down VM
07-06 21:22:04.984 8489-8489/? W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x41692c08)
07-06 21:22:04.994 8489-8489/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.lenovo.app, PID: 8489
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.lenovo.app/com.example.lenovo.app.MainActivity}: java.lang.IllegalStateException: This app has been built with an incorrect configuration. Please configure your build for VectorDrawableCompat.
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2339)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2391)
at android.app.ActivityThread.access$900(ActivityThread.java:166)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1281)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:146)
at android.app.ActivityThread.main(ActivityThread.java:5511)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.IllegalStateException: This app has been built with an incorrect configuration. Please configure your build for VectorDrawableCompat.
at android.support.v7.widget.AppCompatDrawableManager.checkVectorDrawableSetup(AppCompatDrawableManager.java:713)
at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:194)
at android.support.v7.widget.TintTypedArray.getDrawableIfKnown(TintTypedArray.java:81)
at android.support.v7.app.AppCompatDelegateImplBase.<init>(AppCompatDelegateImplBase.java:129)
at android.support.v7.app.AppCompatDelegateImplV9.<init>(AppCompatDelegateImplV9.java:152)
at android.support.v7.app.AppCompatDelegateImplV11.<init>(AppCompatDelegateImplV11.java:29)
at android.support.v7.app.AppCompatDelegateImplV14.<init>(AppCompatDelegateImplV14.java:53)
at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:204)
at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:184)
at android.support.v7.app.AppCompatActivity.getDelegate(AppCompatActivity.java:518)
at android.support.v7.app.AppCompatActivity.onCreate(AppCompatActivity.java:70)
at com.example.lenovo.app.MainActivity.onCreate(MainActivity.java:10)
at android.app.Activity.performCreate(Activity.java:5322)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2303)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2391) 
at android.app.ActivityThread.access$900(ActivityThread.java:166) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1281) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:146) 
at android.app.ActivityThread.main(ActivityThread.java:5511) 
at java.lang.reflect.Method.invokeNative(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:515) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099) 
at dalvik.system.NativeStart.main(Native Method) 
07-06 21:22:07.814 8489-8489/? I/Process: Sending signal. PID: 8489 SIG: 9
add this code to your app.gradle :
android {
//....something
defaultConfig {
generatedDensities = []
}
aaptOptions {
additionalParameters "--no-version-vectors"
}
Yo need to implement correctly VectorDrawableCompat:
1- Make sure that your gradle is updated at less at v2.3.3
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
}
2- In your Gradle:
android {
defaultConfig {
vectorDrawables.useSupportLibrary = true
}
}
dependencies {
compile 'com.android.support:appcompat-v7:23.2.0'
}
3- In your Application class:
#Override
public void onCreate() {
super.onCreate();
AppCompatDelegate.setCompatVectorFromResourcesEnabled(true);
}
4- In your xmls use app:srcCompat instead of android:src
Note:
If you are enabling vector compat in each activity like this
static {
AppCompatDelegate.setCompatVectorFromResourcesEnabled(true);
}
please don't forget extend your activity from AppCompatActivity
If still not works please provide us more information about your project

Could not find class 'android.os.PersistableBundle', referenced from method com.xxx.CartoonActivity.access$super in android 4.4.2

hey guys!
I'm losing my mind. I have a custom gridview class that I have put it inside a scrollview. I have no problem in devices with android +5, but in some devices I got this error:
08-25 01:24:56.890 6673-6673/com.ablazephoenix.mycartoon E/dalvikvm: Could not find class 'android.os.PersistableBundle', referenced from method com.ablazephoenix.mycartoon.CartoonActivity.access$super
08-25 01:24:56.890 6673-6673/com.ablazephoenix.mycartoon W/dalvikvm: VFY: unable to resolve check-cast 296 (Landroid/os/PersistableBundle;) in Lcom/ablazephoenix/mycartoon/CartoonActivity;
08-25 01:24:56.890 6673-6673/com.ablazephoenix.mycartoon D/dalvikvm: VFY: replacing opcode 0x1f at 0x00fc
08-25 01:24:56.890 6673-6673/com.ablazephoenix.mycartoon I/dalvikvm: Could not find method android.content.Context.getColorStateList, referenced from method com.ablazephoenix.mycartoon.CartoonActivity.access$super
08-25 01:24:56.890 6673-6673/com.ablazephoenix.mycartoon W/dalvikvm: VFY: unable to resolve virtual method 688: Landroid/content/Context;.getColorStateList (I)Landroid/content/res/ColorStateList;
08-25 01:24:56.890 6673-6673/com.ablazephoenix.mycartoon D/dalvikvm: VFY: replacing opcode 0x6f at 0x010c
08-25 01:24:56.890 6673-6673/com.ablazephoenix.mycartoon I/dalvikvm: Could not find method android.app.Activity.onVisibleBehindCanceled, referenced from method com.ablazephoenix.mycartoon.CartoonActivity.access$super
08-25 01:24:56.890 6673-6673/com.ablazephoenix.mycartoon W/dalvikvm: VFY: unable to resolve virtual method 294: Landroid/app/Activity;.onVisibleBehindCanceled ()V
08-25 01:24:56.890 6673-6673/com.ablazephoenix.mycartoon D/dalvikvm: VFY: replacing opcode 0x6f at 0x011c
08-25 01:24:56.890 6673-6673/com.ablazephoenix.mycartoon I/dalvikvm: Could not find method android.content.ContextWrapper.deleteSharedPreferences, referenced from method com.ablazephoenix.mycartoon.CartoonActivity.access$super
08-25 01:24:56.890 6673-6673/com.ablazephoenix.mycartoon W/dalvikvm: VFY: unable to resolve virtual method 749: Landroid/content/ContextWrapper;.deleteSharedPreferences (Ljava/lang/String;)Z
08-25 01:24:56.890 6673-6673/com.ablazephoenix.mycartoon D/dalvikvm: VFY: replacing opcode 0x6f at 0x0126
08-25 01:24:56.890 6673-6673/com.ablazephoenix.mycartoon I/dalvikvm: Could not find method android.app.Activity.onWindowStartingActionMode, referenced from method com.ablazephoenix.mycartoon.CartoonActivity.access$super
08-25 01:24:56.890 6673-6673/com.ablazephoenix.mycartoon W/dalvikvm: VFY: unable to resolve virtual method 298: Landroid/app/Activity;.onWindowStartingActionMode (Landroid/view/ActionMode$Callback;I)Landroid/view/ActionMode;
08-25 01:24:56.890 6673-6673/com.ablazephoenix.mycartoon D/dalvikvm: VFY: replacing opcode 0x6f at 0x0151
08-25 01:24:56.890 6673-6673/com.ablazephoenix.mycartoon I/dalvikvm: Could not find method android.app.Activity.dismissKeyboardShortcutsHelper, referenced from method com.ablazephoenix.mycartoon.CartoonActivity.access$super
08-25 01:24:56.890 6673-6673/com.ablazephoenix.mycartoon W/dalvikvm: VFY: unable to resolve virtual method 168: Landroid/app/Activity;.dismissKeyboardShortcutsHelper ()V
08-25 01:24:56.890 6673-6673/com.ablazephoenix.mycartoon D/dalvikvm: VFY: replacing opcode 0x6f at 0x0157
08-25 01:24:56.890 6673-6673/com.ablazephoenix.mycartoon E/dalvikvm: Could not find class 'android.os.PersistableBundle', referenced from method com.ablazephoenix.mycartoon.CartoonActivity.access$super
08-25 01:24:56.890 6673-6673/com.ablazephoenix.mycartoon W/dalvikvm: VFY: unable to resolve check-cast 296 (Landroid/os/PersistableBundle;) in Lcom/ablazephoenix/mycartoon/CartoonActivity;
08-25 01:24:56.890 6673-6673/com.ablazephoenix.mycartoon D/dalvikvm: VFY: replacing opcode 0x1f at 0x01ba
08-25 01:24:56.890 6673-6673/com.ablazephoenix.mycartoon E/dalvikvm: Could not find class 'android.media.session.MediaController', referenced from method com.ablazephoenix.mycartoon.CartoonActivity.access$super
so guys, before I lose my my mind(!) please tell me what this error means? what can I do to resolve this problem?
There is no problem. This is perfectly normal behavior. It indicates that you have code that references classes or methods that do not exist on the version of Android that you are running on. So long as you do not execute any of that code, you are fine. If you do execute some of that code, you will crash, and LogCat will show a Java stack trace showing the source of the error.

OnUnbind of Accessibility Service is not called

I have created one Accessibility Service but if I switch off the accessibility service(for my app) from settings panel, and the app is not alive, onUnbind of service is not called. onUnbind is called everytime if app is alive.
07-13 11:47:24.327 10974-10974/com.example.tarun.myappforkeyevent I/dalvikvm: Could not find method android.content.Context.getSystemService, referenced from method service.MyAccessibilityService.access$super
07-13 11:47:24.327 10974-10974/com.example.tarun.myappforkeyevent W/dalvikvm: VFY: unable to resolve virtual method 502: Landroid/content/Context;.getSystemService (Ljava/lang/Class;)Ljava/lang/Object;
07-13 11:47:24.329 10974-10974/com.example.tarun.myappforkeyevent D/dalvikvm: VFY: replacing opcode 0x6f at 0x0035
07-13 11:47:24.329 10974-10974/com.example.tarun.myappforkeyevent I/dalvikvm: Could not find method android.content.Context.getColorStateList, referenced from method service.MyAccessibilityService.access$super
07-13 11:47:24.330 10974-10974/com.example.tarun.myappforkeyevent W/dalvikvm: VFY: unable to resolve virtual method 484: Landroid/content/Context;.getColorStateList (I)Landroid/content/res/ColorStateList;
07-13 11:47:24.331 10974-10974/com.example.tarun.myappforkeyevent D/dalvikvm: VFY: replacing opcode 0x6f at 0x004f
07-13 11:47:24.331 10974-10974/com.example.tarun.myappforkeyevent I/dalvikvm: Could not find method android.accessibilityservice.AccessibilityService.getWindows, referenced from method service.MyAccessibilityService.access$super
07-13 11:47:24.332 10974-10974/com.example.tarun.myappforkeyevent W/dalvikvm: VFY: unable to resolve virtual method 25: Landroid/accessibilityservice/AccessibilityService;.getWindows ()Ljava/util/List;
07-13 11:47:24.333 10974-10974/com.example.tarun.myappforkeyevent D/dalvikvm: VFY: replacing opcode 0x6f at 0x0080
07-13 11:47:24.333 10974-10974/com.example.tarun.myappforkeyevent I/dalvikvm: Could not find method android.content.ContextWrapper.getCodeCacheDir, referenced from method service.MyAccessibilityService.access$super
07-13 11:47:24.334 10974-10974/com.example.tarun.myappforkeyevent W/dalvikvm: VFY: unable to resolve virtual method 555: Landroid/content/ContextWrapper;.getCodeCacheDir ()Ljava/io/File;
07-13 11:47:24.335 10974-10974/com.example.tarun.myappforkeyevent D/dalvikvm: VFY: replacing opcode 0x6f at 0x00e6
Why is it showing these errors instead of calling onUnbind?

ANDROID: starting activity with button click; the button has a background; excess memory issue

I think i have been able to resolve my MAIN problem - thanks folks for help However, I am getting the following warning / error messages in my logcat:
06-03 10:52:25.420 7149-7149/xxx E/dalvikvm: Could not find class 'android.util.ArrayMap', referenced from method com.android.tools.fd.runtime.MonkeyPatcher.monkeyPatchExistingResources
06-03 10:52:25.420 7149-7149/xxx W/dalvikvm: VFY: unable to resolve check-cast 1832 (Landroid/util/ArrayMap;) in Lcom/android/tools/fd/runtime/MonkeyPatcher;
06-03 10:52:25.420 7149-7149/xxx D/dalvikvm: VFY: replacing opcode 0x1f at 0x0258
06-03 10:52:25.420 7149-7149/xxx E/dalvikvm: Could not find class 'android.util.ArrayMap', referenced from method com.android.tools.fd.runtime.MonkeyPatcher.pruneResourceCache
06-03 10:52:25.420 7149-7149/xxx W/dalvikvm: VFY: unable to resolve const-class 1832 (Landroid/util/ArrayMap;) in Lcom/android/tools/fd/runtime/MonkeyPatcher;
06-03 10:52:25.420 7149-7149/xxx D/dalvikvm: VFY: replacing opcode 0x1c at 0x0058
06-03 10:52:25.435 7149-7149/xxx I/dalvikvm: Could not find method android.content.Context.getSystemService, referenced from method xxx.MainActivity.access$super
06-03 10:52:25.435 7149-7149/xxx W/dalvikvm: VFY: unable to resolve virtual method 512: Landroid/content/Context;.getSystemService (Ljava/lang/Class;)Ljava/lang/Object;
06-03 10:52:25.435 7149-7149/xxx D/dalvikvm: VFY: replacing opcode 0x6f at 0x004b
06-03 10:52:25.435 7149-7149/xxx I/dalvikvm: Could not find method android.app.Activity.stopLockTask, referenced from method xxx.MainActivity.access$super
06-03 10:52:25.435 7149-7149/xxx W/dalvikvm: VFY: unable to resolve virtual method 248: Landroid/app/Activity;.stopLockTask ()V
06-03 10:52:25.435 7149-7149/xxx D/dalvikvm: VFY: replacing opcode 0x6f at 0x00b9
06-03 10:52:25.435 7149-7149/xxx E/dalvikvm: Could not find class 'android.os.PersistableBundle', referenced from method xxx.MainActivity.access$super
06-03 10:52:25.435 7149-7149/xxx W/dalvikvm: VFY: unable to resolve check-cast 260 (Landroid/os/PersistableBundle;) in Lyyy/MainActivity;
06-03 10:52:25.435 7149-7149/xxx D/dalvikvm: VFY: replacing opcode 0x1f at 0x00f1
06-03 10:52:25.435 7149-7149/xxx I/dalvikvm: Could not find method android.content.Context.getColorStateList, referenced from method xxx.MainActivity.access$super
06-03 10:52:25.435 7149-7149/xxx W/dalvikvm: VFY: unable to resolve virtual method 492: Landroid/content/Context;.getColorStateList (I)Landroid/content/res/ColorStateList;
06-03 10:52:25.435 7149-7149/xxx D/dalvikvm: VFY: replacing opcode 0x6f at 0x0101
06-03 10:52:25.435 7149-7149/xxx I/dalvikvm: Could not find method android.app.Activity.onVisibleBehindCanceled, referenced from method xxx.MainActivity.access$super
06-03 10:52:25.435 7149-7149/xxx W/dalvikvm: VFY: unable to resolve virtual method 168: Landroid/app/Activity;.onVisibleBehindCanceled ()V
06-03 10:52:25.435 7149-7149/xxx D/dalvikvm: VFY: replacing opcode 0x6f at 0x0111
06-03 10:52:25.435 7149-7149/xxx I/dalvikvm: Could not find method android.app.Activity.onWindowStartingActionMode, referenced from method xxx.MainActivity.access$super
06-03 10:52:25.435 7149-7149/xxx W/dalvikvm: VFY: unable to resolve virtual method 172: Landroid/app/Activity;.onWindowStartingActionMode (Landroid/view/ActionMode$Callback;I)Landroid/view/ActionMode;
06-03 10:52:25.435 7149-7149/xxx D/dalvikvm: VFY: replacing opcode 0x6f at 0x0137
06-03 10:52:25.435 7149-7149/xxx E/dalvikvm: Could not find class 'android.os.PersistableBundle', referenced from method xxx.MainActivity.access$super
06-03 10:52:25.435 7149-7149/xxx W/dalvikvm: VFY: unable to resolve check-cast 260 (Landroid/os/PersistableBundle;) in Lyyy/MainActivity;
06-03 10:52:25.435 7149-7149/xxx D/dalvikvm: VFY: replacing opcode 0x1f at 0x019a
06-03 10:52:25.435 7149-7149/xxx E/dalvikvm: Could not find class 'android.media.session.MediaController', referenced from method xxx.MainActivity.access$super
06-03 10:52:25.435 7149-7149/xxx W/dalvikvm: VFY: unable to resolve check-cast 213 (Landroid/media/session/MediaController;) in Lyyy/MainActivity;
06-03 10:52:25.435 7149-7149/xxx D/dalvikvm: VFY: replacing opcode 0x1f at 0x01b2
06-03 10:52:25.435 7149-7149/xxx E/dalvikvm: Could not find class 'android.widget.Toolbar', referenced from method xxx.MainActivity.access$super
06-03 10:52:25.435 7149-7149/xxx W/dalvikvm: VFY: unable to resolve check-cast 2020 (Landroid/widget/Toolbar;) in Lyyy/MainActivity;
06-03 10:52:25.435 7149-7149/xxx D/dalvikvm: VFY: replacing opcode 0x1f at 0x01bc
06-03 10:52:25.435 2365-2490/? I/CrashAnrDetector: onPackageUpdateFinished : xxx
06-03 10:52:25.435 7149-7149/xxx I/dalvikvm: Could not find method android.app.Activity.releaseInstance, referenced from method xxx.MainActivity.access$super
06-03 10:52:25.435 7149-7149/xxx W/dalvikvm: VFY: unable to resolve virtual method 179: Landroid/app/Activity;.releaseInstance ()Z
06-03 10:52:25.435 7149-7149/xxx D/dalvikvm: VFY: replacing opcode 0x6f at 0x02dd
06-03 10:52:25.435 7149-7149/xxx I/dalvikvm: Could not find method android.app.Activity.onActivityReenter, referenced from method xxx.MainActivity.access$super
06-03 10:52:25.435 7149-7149/xxx W/dalvikvm: VFY: unable to resolve virtual method 112: Landroid/app/Activity;.onActivityReenter (ILandroid/content/Intent;)V
06-03 10:52:25.435 7149-7149/xxx D/dalvikvm: VFY: replacing opcode 0x6f at 0x02f4
06-03 10:52:25.435 7149-7149/xxx I/dalvikvm: Could not find method android.content.ContextWrapper.getCodeCacheDir, referenced from method xxx.MainActivity.access$super
06-03 10:52:25.435 7149-7149/xxx W/dalvikvm: VFY: unable to resolve virtual method 564: Landroid/content/ContextWrapper;.getCodeCacheDir ()Ljava/io/File;
06-03 10:52:25.435 7149-7149/xxx D/dalvikvm: VFY: replacing opcode 0x6f at 0x0349
06-03 10:52:25.440 7149-7149/xxx I/dalvikvm: DexOpt: illegal method access (call Landroid/support/v4/app/FragmentActivity;.dispatchFragmentsOnCreateView (Landroid/view/View;Ljava/lang/String;Landroid/content/Context;Landroid/util/AttributeSet;)Landroid/view/View; from Lyyy/MainActivity;)
06-03 10:52:25.440 7149-7149/xxx I/dalvikvm: Could not find method android.support.v4.app.FragmentActivity.dispatchFragmentsOnCreateView, referenced from method xxx.MainActivity.access$super
06-03 10:52:25.440 7149-7149/xxx W/dalvikvm: VFY: unable to resolve virtual method 2580: Landroid/support/v4/app/FragmentActivity;.dispatchFragmentsOnCreateView (Landroid/view/View;Ljava/lang/String;Landroid/content/Context;Landroid/util/AttributeSet;)Landroid/view/View;
06-03 10:52:25.440 7149-7149/xxx D/dalvikvm: VFY: replacing opcode 0x6f at 0x0432
06-03 10:52:25.440 7149-7149/xxx I/dalvikvm: Could not find method android.app.Activity.getVoiceInteractor, referenced from method xxx.MainActivity.access$super
06-03 10:52:25.440 7149-7149/xxx W/dalvikvm: VFY: unable to resolve virtual method 91: Landroid/app/Activity;.getVoiceInteractor ()Landroid/app/VoiceInteractor;
06-03 10:52:25.440 7149-7149/xxx D/dalvikvm: VFY: replacing opcode 0x6f at 0x0490
06-03 10:52:25.440 7149-7149/xxx E/dalvikvm: Could not find class 'android.app.ActivityManager$TaskDescription', referenced from method xxx.MainActivity.access$super
06-03 10:52:25.440 7149-7149/xxx W/dalvikvm: VFY: unable to resolve check-cast 26 (Landroid/app/ActivityManager$TaskDescription;) in Lyyy/MainActivity;
06-03 10:52:25.440 7149-7149/xxx D/dalvikvm: VFY: replacing opcode 0x1f at 0x055b
06-03 10:52:25.440 7149-7149/xxx I/dalvikvm: Could not find method android.app.Activity.startActionMode, referenced from method xxx.MainActivity.access$super
06-03 10:52:25.440 7149-7149/xxx W/dalvikvm: VFY: unable to resolve virtual method 223: Landroid/app/Activity;.startActionMode (Landroid/view/ActionMode$Callback;I)Landroid/view/ActionMode;
06-03 10:52:25.440 7149-7149/xxx D/dalvikvm: VFY: replacing opcode 0x6f at 0x0596
06-03 10:52:25.440 7149-7149/xxx I/dalvikvm: Could not find method android.app.Activity.showAssist, referenced from method xxx.MainActivity.access$super
06-03 10:52:25.440 7149-7149/xxx W/dalvikvm: VFY: unable to resolve virtual method 218: Landroid/app/Activity;.showAssist (Landroid/os/Bundle;)Z
06-03 10:52:25.440 7149-7149/xxx D/dalvikvm: VFY: replacing opcode 0x6f at 0x05d8
06-03 10:52:25.440 7149-7149/xxx I/dalvikvm: Could not find method android.app.Activity.postponeEnterTransition, referenced from method xxx.MainActivity.access$super
06-03 10:52:25.440 7149-7149/xxx W/dalvikvm: VFY: unable to resolve virtual method 176: Landroid/app/Activity;.postponeEnterTransition ()V
06-03 10:52:25.440 7149-7149/xxx D/dalvikvm: VFY: replacing opcode 0x6f at 0x05e3
06-03 10:52:25.440 7149-7149/xxx I/dalvikvm: Could not find method android.content.ContextWrapper.getNoBackupFilesDir, referenced from method xxx.MainActivity.access$super
06-03 10:52:25.440 7149-7149/xxx W/dalvikvm: VFY: unable to resolve virtual method 576: Landroid/content/ContextWrapper;.getNoBackupFilesDir ()Ljava/io/File;
06-03 10:52:25.440 7149-7149/xxx D/dalvikvm: VFY: replacing opcode 0x6f at 0x0672
06-03 10:52:25.445 7149-7149/xxx I/dalvikvm: Could not find method android.app.Activity.requestPermissions, referenced from method xxx.MainActivity.access$super
06-03 10:52:25.445 7149-7149/xxx W/dalvikvm: VFY: unable to resolve virtual method 182: Landroid/app/Activity;.requestPermissions ([Ljava/lang/String;I)V
06-03 10:52:25.445 7149-7149/xxx D/dalvikvm: VFY: replacing opcode 0x6f at 0x0787
06-03 10:52:25.445 7149-7149/xxx E/dalvikvm: Could not find class 'android.app.SharedElementCallback', referenced from method xxx.MainActivity.access$super
06-03 10:52:25.445 7149-7149/xxx W/dalvikvm: VFY: unable to resolve check-cast 57 (Landroid/app/SharedElementCallback;) in Lyyy/MainActivity;
06-03 10:52:25.445 7149-7149/xxx D/dalvikvm: VFY: replacing opcode 0x1f at 0x07a1
06-03 10:52:25.445 7149-7149/xxx E/dalvikvm: Could not find class 'android.os.PersistableBundle', referenced from method xxx.MainActivity.access$super
06-03 10:52:25.445 7149-7149/xxx W/dalvikvm: VFY: unable to resolve check-cast 260 (Landroid/os/PersistableBundle;) in Lyyy/MainActivity;
06-03 10:52:25.445 7149-7149/xxx D/dalvikvm: VFY: replacing opcode 0x1f at 0x07e8
06-03 10:52:25.445 7149-7149/xxx W/dalvikvm: DexOpt: resolve class illegal access: Lyyy/MainActivity; -> Landroid/support/v4/app/BaseFragmentActivityDonut;
06-03 10:52:25.445 7149-7149/xxx I/dalvikvm: Could not find method android.support.v4.app.BaseFragmentActivityDonut.onCreateView, referenced from method xxx.MainActivity.access$super
06-03 10:52:25.445 7149-7149/xxx W/dalvikvm: VFY: unable to resolve virtual method 2356: Landroid/support/v4/app/BaseFragmentActivityDonut;.onCreateView (Ljava/lang/String;Landroid/content/Context;Landroid/util/AttributeSet;)Landroid/view/View;
06-03 10:52:25.445 7149-7149/xxx D/dalvikvm: VFY: replacing opcode 0x6f at 0x082c
06-03 10:52:25.445 7149-7149/xxx I/dalvikvm: Could not find method android.content.ContextWrapper.getExternalFilesDirs, referenced from method xxx.MainActivity.access$super
06-03 10:52:25.445 7149-7149/xxx W/dalvikvm: VFY: unable to resolve virtual method 571: Landroid/content/ContextWrapper;.getExternalFilesDirs (Ljava/lang/String;)[Ljava/io/File;
06-03 10:52:25.445 7149-7149/xxx D/dalvikvm: VFY: replacing opcode 0x6f at 0x0882
06-03 10:52:25.445 7149-7149/xxx E/dalvikvm: Could not find class 'android.transition.TransitionManager', referenced from method xxx.MainActivity.access$super
06-03 10:52:25.445 7149-7149/xxx W/dalvikvm: VFY: unable to resolve check-cast 1829 (Landroid/transition/TransitionManager;) in Lyyy/MainActivity;
06-03 10:52:25.445 7149-7149/xxx D/dalvikvm: VFY: replacing opcode 0x1f at 0x093e
06-03 10:52:25.445 7149-7149/xxx I/dalvikvm: Could not find method android.app.Activity.onProvideReferrer, referenced from method xxx.MainActivity.access$super
06-03 10:52:25.445 7149-7149/xxx W/dalvikvm: VFY: unable to resolve virtual method 152: Landroid/app/Activity;.onProvideReferrer ()Landroid/net/Uri;
06-03 10:52:25.445 7149-7149/xxx D/dalvikvm: VFY: replacing opcode 0x6f at 0x097e
06-03 10:52:25.445 7149-7149/xxx I/dalvikvm: DexOpt: illegal method access (call Landroid/support/v4/app/FragmentActivity;.doReallyStop (Z)V from Lyyy/MainActivity;)
06-03 10:52:25.445 7149-7149/xxx I/dalvikvm: Could not find method android.support.v4.app.FragmentActivity.doReallyStop, referenced from method xxx.MainActivity.access$super
06-03 10:52:25.445 7149-7149/xxx W/dalvikvm: VFY: unable to resolve virtual method 2582: Landroid/support/v4/app/FragmentActivity;.doReallyStop (Z)V
06-03 10:52:25.445 7149-7149/xxx D/dalvikvm: VFY: replacing opcode 0x6f at 0x09ab
06-03 10:52:25.450 7149-7149/xxx I/dalvikvm: Could not find method android.content.Context.getDrawable, referenced from method xxx.MainActivity.access$super
06-03 10:52:25.450 7149-7149/xxx W/dalvikvm: VFY: unable to resolve virtual method 496: Landroid/content/Context;.getDrawable (I)Landroid/graphics/drawable/Drawable;
06-03 10:52:25.450 7149-7149/xxx D/dalvikvm: VFY: replacing opcode 0x6f at 0x09f5
06-03 10:52:25.450 7149-7149/xxx I/dalvikvm: Could not find method android.app.Activity.showLockTaskEscapeMessage, referenced from method xxx.MainActivity.access$super
06-03 10:52:25.450 7149-7149/xxx W/dalvikvm: VFY: unable to resolve virtual method 221: Landroid/app/Activity;.showLockTaskEscapeMessage ()V
06-03 10:52:25.450 7149-7149/xxx D/dalvikvm: VFY: replacing opcode 0x6f at 0x0a05
06-03 10:52:25.450 7149-7149/xxx I/dalvikvm: Could not find method android.app.Activity.getContentTransitionManager, referenced from method xxx.MainActivity.access$super
06-03 10:52:25.450 7149-7149/xxx W/dalvikvm: VFY: unable to resolve virtual method 66: Landroid/app/Activity;.getContentTransitionManager ()Landroid/transition/TransitionManager;
06-03 10:52:25.450 7149-7149/xxx D/dalvikvm: VFY: replacing opcode 0x6f at 0x0a0b
06-03 10:52:25.450 7149-7149/xxx E/dalvikvm: Could not find class 'android.app.SharedElementCallback', referenced from method xxx.MainActivity.access$super
06-03 10:52:25.450 7149-7149/xxx W/dalvikvm: VFY: unable to resolve check-cast 57 (Landroid/app/SharedElementCallback;) in Lyyy/MainActivity;
06-03 10:52:25.450 7149-7149/xxx D/dalvikvm: VFY: replacing opcode 0x1f at 0x0ac7
06-03 10:52:25.450 7149-7149/xxx I/dalvikvm: Could not find method android.app.Activity.getReferrer, referenced from method xxx.MainActivity.access$super
06-03 10:52:25.450 7149-7149/xxx W/dalvikvm: VFY: unable to resolve virtual method 80: Landroid/app/Activity;.getReferrer ()Landroid/net/Uri;
06-03 10:52:25.450 7149-7149/xxx D/dalvikvm: VFY: replacing opcode 0x6f at 0x0b3b
06-03 10:52:25.455 7149-7149/xxx I/dalvikvm: Could not find method android.content.ContextWrapper.getSystemServiceName, referenced from method xxx.MainActivity.access$super
06-03 10:52:25.455 7149-7149/xxx W/dalvikvm: VFY: unable to resolve virtual method 585: Landroid/content/ContextWrapper;.getSystemServiceName (Ljava/lang/Class;)Ljava/lang/String;
06-03 10:52:25.455 7149-7149/xxx D/dalvikvm: VFY: replacing opcode 0x6f at 0x0bb8
06-03 10:52:25.455 7149-7149/xxx I/dalvikvm: Could not find method android.app.Activity.isVoiceInteractionRoot, referenced from method xxx.MainActivity.access$super
06-03 10:52:25.455 7149-7149/xxx W/dalvikvm: VFY: unable to resolve virtual method 104: Landroid/app/Activity;.isVoiceInteractionRoot ()Z
06-03 10:52:25.455 7149-7149/xxx D/dalvikvm: VFY: replacing opcode 0x6f at 0x0be0
06-03 10:52:25.455 7149-7149/xxx I/dalvikvm: Could not find method android.content.ContextWrapper.getExternalMediaDirs, referenced from method xxx.MainActivity.access$super
06-03 10:52:25.455 7149-7149/xxx W/dalvikvm: VFY: unable to resolve virtual method 572: Landroid/content/ContextWrapper;.getExternalMediaDirs ()[Ljava/io/File;
06-03 10:52:25.455 7149-7149/xxx D/dalvikvm: VFY: replacing opcode 0x6f at 0x0c68
06-03 10:52:25.455 7149-7149/xxx I/dalvikvm: Could not find method android.app.Activity.getMediaController, referenced from method xxx.MainActivity.access$super
06-03 10:52:25.455 7149-7149/xxx W/dalvikvm: VFY: unable to resolve virtual method 74: Landroid/app/Activity;.getMediaController ()Landroid/media/session/MediaController;
06-03 10:52:25.455 7149-7149/xxx D/dalvikvm: VFY: replacing opcode 0x6f at 0x0cac
06-03 10:52:25.455 7149-7149/xxx I/dalvikvm: Could not find method android.app.Activity.getSearchEvent, referenced from method xxx.MainActivity.access$super
06-03 10:52:25.455 7149-7149/xxx W/dalvikvm: VFY: unable to resolve virtual method 83: Landroid/app/Activity;.getSearchEvent ()Landroid/view/SearchEvent;
06-03 10:52:25.455 7149-7149/xxx D/dalvikvm: VFY: replacing opcode 0x6f at 0x0d2b
06-03 10:52:25.455 7149-7149/xxx I/dalvikvm: DexOpt: illegal method access (call Landroid/support/v4/app/FragmentActivity;.onReallyStop ()V from Lyyy/MainActivity;)
06-03 10:52:25.455 7149-7149/xxx I/dalvikvm: Could not find method android.support.v4.app.FragmentActivity.onReallyStop, referenced from method xxx.MainActivity.access$super
06-03 10:52:25.455 7149-7149/xxx W/dalvikvm: VFY: unable to resolve virtual method 2616: Landroid/support/v4/app/FragmentActivity;.onReallyStop ()V
06-03 10:52:25.455 7149-7149/xxx D/dalvikvm: VFY: replacing opcode 0x6f at 0x0d6b
06-03 10:52:25.455 5258-5258/? D/AbsListView: onDetachedFromWindow
06-03 10:52:25.455 7149-7149/xxx I/dalvikvm: Could not find method android.app.Activity.isVoiceInteraction, referenced from method xxx.MainActivity.access$super
06-03 10:52:25.455 7149-7149/xxx W/dalvikvm: VFY: unable to resolve virtual method 103: Landroid/app/Activity;.isVoiceInteraction ()Z
06-03 10:52:25.455 7149-7149/xxx D/dalvikvm: VFY: replacing opcode 0x6f at 0x0ddb
06-03 10:52:25.455 7149-7149/xxx I/dalvikvm: Could not find method android.app.Activity.requestVisibleBehind, referenced from method xxx.MainActivity.access$super
06-03 10:52:25.455 7149-7149/xxx W/dalvikvm: VFY: unable to resolve virtual method 183: Landroid/app/Activity;.requestVisibleBehind (Z)Z
06-03 10:52:25.455 7149-7149/xxx D/dalvikvm: VFY: replacing opcode 0x6f at 0x0e40
06-03 10:52:25.455 7149-7149/xxx I/dalvikvm: Could not find method android.app.Activity.shouldShowRequestPermissionRationale, referenced from method xxx.MainActivity.access$super
06-03 10:52:25.455 7149-7149/xxx W/dalvikvm: VFY: unable to resolve virtual method 216: Landroid/app/Activity;.shouldShowRequestPermissionRationale (Ljava/lang/String;)Z
06-03 10:52:25.455 7149-7149/xxx D/dalvikvm: VFY: replacing opcode 0x6f at 0x0e55
06-03 10:52:25.455 7149-7149/xxx I/dalvikvm: Could not find method android.app.Activity.finishAndRemoveTask, referenced from method xxx.MainActivity.access$super
What I have?
Main activity - having 7 buttons, each button has an image as a background. All the buttons are clickable, and on click of each button a new activity is started. So, if I click button 1, then activity1 is started, on clicking button2, activity2 is started and so on. Each of the new activities, i.e., activity1, activity2, ... activity7 also have an image, which the app is taking from the mipmap folder.
activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="#dimen/activity_vertical_margin"
android:paddingLeft="#dimen/activity_horizontal_margin"
android:paddingRight="#dimen/activity_horizontal_margin"
android:paddingTop="#dimen/activity_vertical_margin"
tools:context="xxx.MainActivity">
<Button
android:layout_width="103dp"
android:layout_height="82dp"
android:id="#+id/btn_inside"
android:layout_below="#+id/LL_subheading1"
android:layout_centerHorizontal="true"
android:background="#mipmap/pic_small_inside"
style="#style/Widget.AppCompat.Button.Borderless"
android:clickable="true"/>
<Button
android:layout_width="103dp"
android:layout_height="82dp"
android:id="#+id/btn_on_the_side1"
android:layout_below="#+id/LL_subheading2"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:background="#mipmap/pic_small_on_the_side1"
style="#style/Base.Widget.AppCompat.Button.Borderless"
android:clickable="true"/>
<Button
android:layout_width="103dp"
android:layout_height="82dp"
android:id="#+id/btn_on_the_side3"
android:layout_below="#+id/LL_subheading2"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:background="#mipmap/pic_small_on_the_side3"
style="#style/Base.Widget.AppCompat.Button.Borderless"
android:clickable="true"/>
<Button
android:layout_width="103dp"
android:layout_height="82dp"
android:id="#+id/btn_on_the_side2"
android:layout_alignTop="#+id/btn_on_the_side1"
android:layout_centerHorizontal="true"
android:background="#mipmap/pic_small_on_the_side2"
style="#style/Base.Widget.AppCompat.Button.Borderless"
android:clickable="true"/>
</RelativeLayout>
MainActivity.java
public class MainActivity extends AppCompatActivity {
private static Button btn1, btn2, btn3, btn4, btn5, btn6, btn7;
#
Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
OnClickButtonListener();
}
public void OnClickButtonListener() {
btn1 = (Button) findViewById(R.id.btn_1);
btn1.setOnClickListener(new View.OnClickListener() {#
Override
public void onClick(View v) {
Intent intent_1 = new Intent(MainActivity.this, MainActivity_1.class);
startActivity(intent_1);
}
});
btn2 = (Button) findViewById(R.id.btn_2);
btn2.setOnClickListener(new View.OnClickListener() {#
Override
public void onClick(View v) {
Intent intent_2 = new Intent(MainActivity.this, MainActivity_2.class);
startActivity(intent_2);
}
});
btn3 = (Button) findViewById(R.id.btn_3);
btn3.setOnClickListener(new View.OnClickListener() {#
Override
public void onClick(View v) {
Intent intent_3 = new Intent(MainActivity.this, MainActivity_3.class);
startActivity(intent_3);
}
});
btn4 = (Button) findViewById(R.id.btn_4);
btn4.setOnClickListener(new View.OnClickListener() {#
Override
public void onClick(View v) {
Intent intent_4 = new Intent(MainActivity.this, MainActivity_4.class);
startActivity(intent_4);
}
});
btn5 = (Button) findViewById(R.id.btn_5);
btn5.setOnClickListener(new View.OnClickListener() {#
Override
public void onClick(View v) {
Intent intent_5 = new Intent(MainActivity.this, MainActivity_5.class);
startActivity(intent_5);
}
});
btn6 = (Button) findViewById(R.id.btn_6);
btn6.setOnClickListener(new View.OnClickListener() {#
Override
public void onClick(View v) {
Intent intent_6 = new Intent(MainActivity.this, MainActivity_6.class);
startActivity(intent_6);
}
});
btn7 = (Button) findViewById(R.id.btn_7);
btn7.setOnClickListener(new View.OnClickListener() {#
Override
public void onClick(View v) {
Intent intent_7 = new Intent(MainActivity.this, MainActivity_7.class);
startActivity(intent_7);
}
});
}
}
logcat
05 - 25 23: 43: 17.209 17042 - 17042 < XX > W / < YY > : threadid = 1: thread exiting with uncaught exception(group = 0x41e4e700)
05 - 25 23: 43: 17.209 17042 - 17042 < XX > E / AndroidRuntime: FATAL EXCEPTION: main
java.lang.OutOfMemoryError
at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java: 596)
at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java: 444)
at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java: 832)
at android.content.res.Resources.loadDrawable(Resources.java: 2988)
at android.content.res.TypedArray.getDrawable(TypedArray.java: 602)
at android.view.View. < init > (View.java: 3563)
at android.widget.TextView. < init > (TextView.java: 881)
at android.widget.Button. < init > (Button.java: 108)
at android.support.v7.widget.AppCompatButton. < init > (AppCompatButton.java: 62)
at android.support.v7.widget.AppCompatButton. < init > (AppCompatButton.java: 58)
at android.support.v7.app.AppCompatViewInflater.createView(AppCompatViewInflater.java: 105)
at android.support.v7.app.AppCompatDelegateImplV7.createView(AppCompatDelegateImplV7.java: 972)
at android.support.v7.app.AppCompatDelegateImplV7.onCreateView(AppCompatDelegateImplV7.java: 1030)
at android.support.v4.view.LayoutInflaterCompatHC$FactoryWrapperHC.onCreateView(LayoutInflaterCompatHC.java: 44)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java: 690)
at android.view.LayoutInflater.rInflate(LayoutInflater.java: 761)
at android.view.LayoutInflater.inflate(LayoutInflater.java: 498)
at android.view.LayoutInflater.inflate(LayoutInflater.java: 398)
at android.view.LayoutInflater.inflate(LayoutInflater.java: 354)
at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java: 276)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java: 136)
at abcpqr.red.MainActivity_1.onCreate(MainActivity_1.java: 21)
at android.app.Activity.performCreate(Activity.java: 5372)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java: 1104)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 2257)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java: 2349)
at android.app.ActivityThread.access$700(ActivityThread.java: 159)
t android.app.ActivityThread$H.handleMessage(ActivityThread.java: 1316)
at android.os.Handler.dispatchMessage(Handler.java: 99)
at android.os.Looper.loop(Looper.java: 176)
at android.app.ActivityThread.main(ActivityThread.java: 5419)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java: 525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java: 1046)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java: 862)
at dalvik.system.NativeStart.main(Native Method)
05 - 25 23: 43: 25.074 17042 - 17042 < XX > I / Process: Sending signal.PID: 17042 SIG: 9
What is my problem?
I am having the error of excess memory.
Graphical representation of my problem
Please see the image below:
Please could somebody help me? Is there a better way of approaching such a problem?
Any help will be much appreciated. Thanks!
1) Make sure your images are the best size for the highest density they'll be displayed on. (If they're huge images that are being compressed they're taking up a lot of extra memory).
2) Change all your buttons to ImageButtons, then clear out memory after during the activity onStop():
#Override
protected void onStop(){
// This controls the images and makes sure
// they're not using memory once the activity is closed
Drawable d = imageButton1.getDrawable();
if (d != null) d.setCallback(null);
imageButton1.setImageDrawable(null);
}
Just remember that when you want to reload the activity, you'll have to redeclare your imageButton src.
#Override
protected void onResume(){
super.onResume();
imageButton1.setImageResource(R.mipmap.pic_small_inside);
}

Categories

Resources