修改一个类构造函数,发现dalvikvm总报错,优化不过去
.method private constructor <init>()V
.locals 3
.prologue
const/4 v2, 0x4
const/4 v1, 0x0
.line 3130
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 116
new-instance v0, Landroid/util/TypedValue;
invoke-direct {v0}, Landroid/util/TypedValue;-><init>()V
iput-object v0, p0, Landroid/content/res/Resources;->mTmpValue:Landroid/util/TypedValue;
.line 117
new-instance v0, Landroid/content/res/Configuration;
invoke-direct {v0}, Landroid/content/res/Configuration;-><init>()V
iput-object v0, p0, Landroid/content/res/Resources;->mTmpConfig:Landroid/content/res/Configuration;
.line 120
new-instance v0, Landroid/util/LongSparseArray;
invoke-direct {v0}, Landroid/util/LongSparseArray;-><init>()V
iput-object v0, p0, Landroid/content/res/Resources;->mDrawableCache:Landroid/util/LongSparseArray;
.line 122
new-instance v0, Landroid/util/LongSparseArray;
invoke-direct {v0}, Landroid/util/LongSparseArray;-><init>()V
iput-object v0, p0, Landroid/content/res/Resources;->mColorStateListCache:Landroid/util/LongSparseArray;
.line 124
new-instance v0, Landroid/util/LongSparseArray;
invoke-direct {v0}, Landroid/util/LongSparseArray;-><init>()V
iput-object v0, p0, Landroid/content/res/Resources;->mColorDrawableCache:Landroid/util/LongSparseArray;
.line 128
iput-object v1, p0, Landroid/content/res/Resources;->mCachedStyledAttributes:Landroid/content/res/TypedArray;
.line 129
iput-object v1, p0, Landroid/content/res/Resources;->mLastRetrievedAttrs:Ljava/lang/RuntimeException;
.line 131
const/4 v0, -0x1
iput v0, p0, Landroid/content/res/Resources;->mLastCachedXmlBlockIndex:I
.line 132
new-array v0, v2, [I
fill-array-data v0, :array_92
iput-object v0, p0, Landroid/content/res/Resources;->mCachedXmlBlockIds:[I
.........
.line 3140
return-void
:cond_8b
move-object v0, v1
.line 160
goto :goto_56
:cond_8d
move-object v0, v1
.line 172
goto :goto_61
:cond_8f
move-object v0, v1
.line 198
goto :goto_6c
.line 132
nop
nop
nop
nop
:array_92
.array-data 4
0x0
0x0
0x0
0x0
.end array-data
.end method
修改这个类的构造函数, 发现总是在fill-array-data 指令提示失败
求助虫虫版主,在前边加过一个nop,两个、三个、四个都试过了还是爆unaligned错误。
01-04 07:49:52.261: W/dalvikvm(17909): VFY: unaligned array data table: at 49, data offset 108
01-04 07:49:52.261: W/dalvikvm(17909): VFY: rejecting opcode 0x26 at 0x0031
01-04 07:49:52.261: W/dalvikvm(17909): VFY: rejected Landroid/content/res/Resources;.<init> ()V
01-04 07:49:52.261: W/dalvikvm(17909): Verifier rejected class Landroid/content/res/Resources;
01-04 07:49:52.261: W/dalvikvm(17909): threadid=5: thread exiting with uncaught exception (group=0x4160eac8)
[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课