I Make An App "Birthday card" That Contains a Image View and two Text Views And I Run this on Genymotion Emulator And The Message Appear
"Unfortunately,Happy Birthday has stopped."
1-ActivityMain.xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:src="#drawable/androidparty" />
<TextView
android:text="Happy Birthday Mohamed"
android:layout_width="wrap_content"
android:textSize="36sp"
android:fontFamily="sans-serif-light"
android:textColor="#android:color/white"
android:layout_height="wrap_content"
android:id="#+id/textView2" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_marginBottom="24dp"
android:layout_marginEnd="13dp"
android:layout_marginRight="13dp"
android:text="From,Abo Elmagd"
android:textSize="36sp"
android:textColor="#android:color/white"
android:id="#+id/textView" />
</RelativeLayout>
2- MainActivity.java
package com.example.android.happybirthday;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
public class MainActivity extends AppCompatActivity {
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}
3- logcat
02-17 21:31:57.757 1658-1658/? D/dalvikvm: Late-enabling CheckJNI
02-17 21:31:57.869 1658-1658/? I/dalvikvm: Could not find method
android.view.Window$Callback.onPointerCaptureChanged, referenced from method
android.support.v7.view.WindowCallbackWrapper.onPointerCaptureChanged
02-17 21:31:57.869 1658-1658/? W/dalvikvm: VFY: unable to resolve interface
method 15988: Landroid/view/Window$Callback;.onPointerCaptureChanged (Z)V
02-17 21:31:57.869 1658-1658/? D/dalvikvm: VFY: replacing opcode 0x72 at
0x0002
02-17 21:31:57.869 1658-1658/? I/dalvikvm: Could not find method
android.view.Window$Callback.onProvideKeyboardShortcuts, referenced from
method
android.support.v7.view.WindowCallbackWrapper.onProvideKeyboardShortcuts
02-17 21:31:57.869 1658-1658/? W/dalvikvm: VFY: unable to resolve interface
method 15990: Landroid/view/Window$Callback;.onProvideKeyboardShortcuts
(Ljava/util/List;Landroid/view/Menu;I)V
02-17 21:31:57.873 1658-1658/? D/dalvikvm: VFY: replacing opcode 0x72 at
0x0002
02-17 21:31:57.873 1658-1658/? W/dalvikvm: VFY: unable to find class
referenced in signature (Landroid/view/SearchEvent;)
02-17 21:31:57.873 1658-1658/? I/dalvikvm: Could not find method
android.view.Window$Callback.onSearchRequested, referenced from method
android.support.v7.view.WindowCallbackWrapper.onSearchRequested
02-17 21:31:57.873 1658-1658/? W/dalvikvm: VFY: unable to resolve interface
method 15992: Landroid/view/Window$Callback;.onSearchRequested
(Landroid/view/SearchEvent;)Z
02-17 21:31:57.873 1658-1658/? D/dalvikvm: VFY: replacing opcode 0x72 at
0x0002
02-17 21:31:57.877 1658-1658/? I/dalvikvm: Could not find method
android.view.Window$Callback.onWindowStartingActionMode, referenced from
method
android.support.v7.view.WindowCallbackWrapper.onWindowStartingActionMode
02-17 21:31:57.877 1658-1658/? W/dalvikvm: VFY: unable to resolve interface
method 15996: Landroid/view/Window$Callback;.onWindowStartingActionMode
(Landroid/view/ActionMode$Callback;I)Landroid/view/ActionMode;
02-17 21:31:57.877 1658-1658/? D/dalvikvm: VFY: replacing opcode 0x72 at
0x0002
02-17 21:31:57.877 1658-1658/? I/dalvikvm: Could not find method
android.content.res.TypedArray.getChangingConfigurations, referenced from
method android.support.v7.widget.TintTypedArray.getChangingConfigurations
02-17 21:31:57.889 1658-1658/? W/dalvikvm: VFY: unable to resolve virtual
method 704: Landroid/content/res/TypedArray;.getChangingConfigurations ()I
02-17 21:31:57.889 1658-1658/? D/dalvikvm: VFY: replacing opcode 0x6e at
0x0002
02-17 21:31:57.889 1658-1658/? I/dalvikvm: Could not find method
android.content.res.TypedArray.getType, referenced from method
android.support.v7.widget.TintTypedArray.getType
02-17 21:31:57.889 1658-1658/? W/dalvikvm: VFY: unable to resolve virtual
method 726: Landroid/content/res/TypedArray;.getType (I)I
02-17 21:31:57.889 1658-1658/? D/dalvikvm: VFY: replacing opcode 0x6e at
0x0008
02-17 21:31:57.889 1658-1658/? I/dalvikvm: Could not find method
android.content.Context.createDeviceProtectedStorageContext, referenced from
method
android.support.v4.content.ContextCompat.createDeviceProtectedStorageContext
02-17 21:31:57.889 1658-1658/? W/dalvikvm: VFY: unable to resolve virtual
method 485: Landroid/content/Context;.createDeviceProtectedStorageContext
()Landroid/content/Context;
02-17 21:31:57.889 1658-1658/? D/dalvikvm: VFY: replacing opcode 0x6e at
0x0006
02-17 21:31:57.889 1658-1658/? I/dalvikvm: Could not find method
android.content.Context.getCodeCacheDir, referenced from method
android.support.v4.content.ContextCompat.getCodeCacheDir
02-17 21:31:57.889 1658-1658/? W/dalvikvm: VFY: unable to resolve virtual
method 491: Landroid/content/Context;.getCodeCacheDir ()Ljava/io/File;
02-17 21:31:57.889 1658-1658/? D/dalvikvm: VFY: replacing opcode 0x6e at
0x0006
02-17 21:31:57.889 1658-1658/? I/dalvikvm: Could not find method
android.content.Context.getColor, referenced from method
android.support.v4.content.ContextCompat.getColor
02-17 21:31:57.893 1658-1658/? W/dalvikvm: VFY: unable to resolve virtual
method 492: Landroid/content/Context;.getColor (I)I
02-17 21:31:57.893 1658-1658/? D/dalvikvm: VFY: replacing opcode 0x6e at
0x0006
02-17 21:31:57.893 1658-1658/? I/dalvikvm: Could not find method
android.content.Context.getColorStateList, referenced from method
android.support.v4.content.ContextCompat.getColorStateList
02-17 21:31:57.893 1658-1658/? W/dalvikvm: VFY: unable to resolve virtual
method 493: Landroid/content/Context;.getColorStateList
(I)Landroid/content/res/ColorStateList;
02-17 21:31:57.893 1658-1658/? D/dalvikvm: VFY: replacing opcode 0x6e at
0x0006
02-17 21:31:57.893 1658-1658/? I/dalvikvm: Could not find method
android.content.Context.getDataDir, referenced from method
android.support.v4.content.ContextCompat.getDataDir
02-17 21:31:57.893 1658-1658/? W/dalvikvm: VFY: unable to resolve virtual
method 495: Landroid/content/Context;.getDataDir ()Ljava/io/File;
02-17 21:31:57.893 1658-1658/? D/dalvikvm: VFY: replacing opcode 0x6e at
0x0006
02-17 21:31:57.893 1658-1658/? I/dalvikvm: Could not find method
android.content.Context.getDrawable, referenced from method
android.support.v4.content.ContextCompat.getDrawable
02-17 21:31:57.893 1658-1658/? W/dalvikvm: VFY: unable to resolve virtual
method 496: Landroid/content/Context;.getDrawable
(I)Landroid/graphics/drawable/Drawable;
02-17 21:31:57.893 1658-1658/? D/dalvikvm: VFY: replacing opcode 0x6e at
0x0006
Might be many things, for example: you forgot to add your activity to the manifest.
But I am going to go ahead and guess that you dont have a root layout which should be something like this:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:src="#drawable/androidparty" />
<TextView
android:text="Happy Birthday Mohamed"
android:layout_width="wrap_content"
android:textSize="36sp"
android:fontFamily="sans-serif-light"
android:textColor="#android:color/white"
android:layout_height="wrap_content"
android:id="#+id/textView2" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_marginBottom="24dp"
android:layout_marginEnd="13dp"
android:layout_marginRight="13dp"
android:text="From,Abo Elmagd"
android:textSize="36sp"
android:textColor="#android:color/white"
android:id="#+id/textView" />
</RelativeLayout>
Related
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)
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
I'm encountering some problems running my app on devices with android version <5 (works fine on Lollipop and Marshmellow, crashes on start on Jelly Bean).
Things that can help: i'm using google maps on my app.
Here's the debug code:
I/System.out: waiting for debugger to settle...
I/System.out: debugger has settled (1302)
I/ActivityThread: Pub com.developer.project.firebaseinitprovider: com.google.firebase.provider.FirebaseInitProvider
I/FirebaseInitProvider: FirebaseApp initialization unsuccessful
I/dalvikvm: Could not find method android.view.Window$Callback.onProvideKeyboardShortcuts, referenced from method android.support.v7.view.WindowCallbackWrapper.onProvideKeyboardShortcuts
W/dalvikvm: VFY: unable to resolve interface method 21082: Landroid/view/Window$Callback;.onProvideKeyboardShortcuts (Ljava/util/List;Landroid/view/Menu;I)V
D/dalvikvm: VFY: replacing opcode 0x72 at 0x0002
W/dalvikvm: VFY: unable to find class referenced in signature (Landroid/view/SearchEvent;)
I/dalvikvm: Could not find method android.view.Window$Callback.onSearchRequested, referenced from method android.support.v7.view.WindowCallbackWrapper.onSearchRequested
W/dalvikvm: VFY: unable to resolve interface method 21084: Landroid/view/Window$Callback;.onSearchRequested (Landroid/view/SearchEvent;)Z
D/dalvikvm: VFY: replacing opcode 0x72 at 0x0002
I/dalvikvm: Could not find method android.view.Window$Callback.onWindowStartingActionMode, referenced from method android.support.v7.view.WindowCallbackWrapper.onWindowStartingActionMode
W/dalvikvm: VFY: unable to resolve interface method 21088: Landroid/view/Window$Callback;.onWindowStartingActionMode (Landroid/view/ActionMode$Callback;I)Landroid/view/ActionMode;
D/dalvikvm: VFY: replacing opcode 0x72 at 0x0002
I/dalvikvm: Could not find method android.content.res.TypedArray.getChangingConfigurations, referenced from method android.support.v7.widget.TintTypedArray.getChangingConfigurations
W/dalvikvm: VFY: unable to resolve virtual method 683: Landroid/content/res/TypedArray;.getChangingConfigurations ()I
D/dalvikvm: VFY: replacing opcode 0x6e at 0x0002
I/dalvikvm: Could not find method android.content.res.TypedArray.getType, referenced from method android.support.v7.widget.TintTypedArray.getType
W/dalvikvm: VFY: unable to resolve virtual method 705: Landroid/content/res/TypedArray;.getType (I)I
D/dalvikvm: VFY: replacing opcode 0x6e at 0x0008
I/dalvikvm: Could not find method android.support.graphics.drawable.VectorDrawableCompat.getLayoutDirection, referenced from method android.support.graphics.drawable.VectorDrawableCompat.needMirroring
W/dalvikvm: VFY: unable to resolve virtual method 3949: Landroid/support/graphics/drawable/VectorDrawableCompat;.getLayoutDirection ()I
D/dalvikvm: VFY: replacing opcode 0x6e at 0x000f
I/dalvikvm: Could not find method android.widget.FrameLayout.startActionModeForChild, referenced from method android.support.v7.widget.ActionBarContainer.startActionModeForChild
W/dalvikvm: VFY: unable to resolve virtual method 21671: Landroid/widget/FrameLayout;.startActionModeForChild (Landroid/view/View;Landroid/view/ActionMode$Callback;I)Landroid/view/ActionMode;
D/dalvikvm: VFY: replacing opcode 0x6f at 0x0002
I/dalvikvm: Could not find method android.view.ViewGroup.onRtlPropertiesChanged, referenced from method android.support.v7.widget.Toolbar.onRtlPropertiesChanged
W/dalvikvm: VFY: unable to resolve virtual method 20966: Landroid/view/ViewGroup;.onRtlPropertiesChanged (I)V
D/dalvikvm: VFY: replacing opcode 0x6f at 0x0007
I/dalvikvm: Could not find method android.content.Context.getColorStateList, referenced from method android.support.v7.content.res.AppCompatResources.getColorStateList
W/dalvikvm: VFY: unable to resolve virtual method 442: Landroid/content/Context;.getColorStateList (I)Landroid/content/res/ColorStateList;
D/dalvikvm: VFY: replacing opcode 0x6e at 0x0006
I/dalvikvm: Could not find method android.content.res.Resources.getDrawable, referenced from method android.support.v7.widget.ResourcesWrapper.getDrawable
W/dalvikvm: VFY: unable to resolve virtual method 646: Landroid/content/res/Resources;.getDrawable (ILandroid/content/res/Resources$Theme;)Landroid/graphics/drawable/Drawable;
D/dalvikvm: VFY: replacing opcode 0x6e at 0x0002
I/dalvikvm: Could not find method android.content.res.Resources.getDrawableForDensity, referenced from method android.support.v7.widget.ResourcesWrapper.getDrawableForDensity
W/dalvikvm: VFY: unable to resolve virtual method 648: Landroid/content/res/Resources;.getDrawableForDensity (IILandroid/content/res/Resources$Theme;)Landroid/graphics/drawable/Drawable;
D/dalvikvm: VFY: replacing opcode 0x6e at 0x0002
E/dalvikvm: Could not find class 'android.graphics.drawable.RippleDrawable', referenced from method android.support.v7.widget.AppCompatImageHelper.hasOverlappingRendering
W/dalvikvm: VFY: unable to resolve instanceof 186 (Landroid/graphics/drawable/RippleDrawable;) in Landroid/support/v7/widget/AppCompatImageHelper;
D/dalvikvm: VFY: replacing opcode 0x20 at 0x000c
D/dalvikvm: GC_CONCURRENT freed 221K, 4% free 8135K/8391K, paused 14ms+1ms, total 24ms
W/ResourceType: Failure getting entry for 0x7f020083 (t=1 e=131) in package 0 (error -75)
D/AndroidRuntime: Shutting down VM
W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0xae6aa228)
E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.developer.project/com.developer.project.MainActivity}: android.view.InflateException: Binary XML file line #30: Error inflating class ImageView
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2059)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
at android.app.ActivityThread.access$600(ActivityThread.java:130)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4745)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.view.InflateException: Binary XML file line #30: Error inflating class ImageView
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:284)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:143)
at com.developer.project.MainActivity.onCreate(MainActivity.java:38)
at android.app.Activity.performCreate(Activity.java:5008)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
at android.app.ActivityThread.access$600(ActivityThread.java:130)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4745)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.content.res.Resources$NotFoundException: Resource is not a Drawable (color or path): TypedValue{t=0x1/d=0x7f020083 a=-1 r=0x7f020083}
at android.content.res.Resources.loadDrawable(Resources.java:1897)
at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
at android.widget.ImageView.<init>(ImageView.java:120)
at android.support.v7.widget.AppCompatImageView.<init>(AppCompatImageView.java:60)
at android.support.v7.widget.AppCompatImageView.<init>(AppCompatImageView.java:56)
at android.support.v7.app.AppCompatViewInflater.createView(AppCompatViewInflater.java:106)
at android.support.v7.app.AppCompatDelegateImplV9.createView(AppCompatDelegateImplV9.java:1017)
at android.support.v7.app.AppCompatDelegateImplV9.onCreateView(AppCompatDelegateImplV9.java:1076)
at android.support.v4.view.LayoutInflaterCompatHC$FactoryWrapperHC.onCreateView(LayoutInflaterCompatHC.java:44)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:675)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:284)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:143)
at com.developer.project.MainActivity.onCreate(MainActivity.java:38)
at android.app.Activity.performCreate(Activity.java:5008)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
at android.app.ActivityThread.access$600(ActivityThread.java:130)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4745)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
In the exception, you can see "Error inflating class ImageView", but if I remove the ImageView the error it's in the textvivew and so on...
The error in "MainActivity" is on the line "setContentView"
This is the mainActivity xml (I think not useful...):
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#F8F8F8">
<TextView
android:layout_width="100dp"
android:layout_height="5dp"
android:id="#+id/textView72"
android:textSize="20dp"
android:gravity="center_vertical"
android:background="#CCCCCC"
android:paddingLeft="10dp"
android:textColor="#FFFFFF"
android:layout_centerVertical="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:id="#+id/imageViewInfo"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:src="#drawable/info_logo"
android:layout_marginBottom="5dp"
android:layout_marginRight="5dp" />
<GridLayout
android:layout_width="295dp"
android:layout_height="175dp"
android:id="#+id/gridLayoutStart"
android:background="#FFF9F9"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true">
<Button
android:layout_width="285dp"
android:layout_height="85dp"
android:text="#string/searchByCity"
android:id="#+id/btnSearchCity"
android:layout_row="0"
android:layout_column="0"
android:background="#drawable/circlebutton_top"
android:textColor="#FFFFFF"
android:textSize="18dp"
android:typeface="sans"
android:textAllCaps="false"
android:drawableLeft="#drawable/search_40"
android:paddingLeft="10dp"
android:layout_columnSpan="2"/>
<Button
android:layout_width="285dp"
android:layout_height="85dp"
android:text="#string/nearMe"
android:id="#+id/btnNearMe"
android:layout_row="1"
android:layout_column="0"
android:background="#drawable/circlebutton_bottom"
android:textColor="#FFFFFF"
android:textSize="18dp"
android:typeface="sans"
android:textAllCaps="false"
android:drawableLeft="#drawable/map_40"
android:paddingLeft="10dp"
android:layout_marginTop="5dp"
android:layout_columnSpan="2" />
</GridLayout>
</RelativeLayout>
<ListView
android:id="#+id/navListBench"
android:layout_width="200dp"
android:layout_height="match_parent"
android:layout_gravity="left|start"
android:background="#ffeeeeee"/>
</android.support.v4.widget.DrawerLayout>
I confirm that on my devices with android 5 and 6 the app is working perfectly...
Solved.
The problem was not firebase, but the drawables.
In the exception, the right thing to watch was "Resource is not a Drawable".
There was two drawable folders: one called "drawable" and an another "drawable-21".
I've moved all to the main drawable folder and now it's working.
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.
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?