创建一个函数,将.error添加到EditText

时间:2018-05-17 23:11:34

标签: android kotlin

我有一个包含很多EditText的应用程序,我想创建一个向它们添加错误的函数,例如,如果是特定的EditText.lenght() == 0,那么它必须设置错误"Error, field must not be empty"左右。

我尝试了什么

我有一个功能:

fun errorEmpty(et: EditText) {
    if(et.length() > 0)
        et.error = null
    else {
        et.error = "Error, field must not be empty"
        et.requestFocus()
        }
    }

这个打破了应用程序:

var et = someEditText
errorEmpty(et)

这是最后一个的日志

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

这个没有做任何事情(它不会破坏应用程序):

errrorEmpty(someEditText)

提前致谢!

编辑:

我也尝试过:

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

然后将结果分配给EditText:

et = errorEmpty(et)

它也打破了应用程序,这是日志:

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

(由于角色限制,我只发布了我认为重要的部分)

0 个答案:

没有答案