W System.err: java.lang.VerifyError: Verifier rejected class xxxx

类似这种报错

12-16 19:16:22.541 30891 30891 W System.err: java.lang.VerifyError: Verifier rejected class com.dangdang.reader.personal.DataHelper: int com.dangdang.reader.personal.DataHelper.a(com.dangdang.reader.domain.ShelfBook, java.lang.String, android.app.Activity, int) failed to verify: int com.dangdang.reader.personal.DataHelper.a(com.dangdang.reader.domain.ShelfBook, java.lang.String, android.app.Activity, int): [0x20] 'this' argument 'Precise Reference: java.lang.String' not instance of 'Precise Reference: com.dangdang.reader.personal.DataHelper' (declaration of 'com.dangdang.reader.personal.DataHelper' appears in /data/app/com.dangdang.reader-1/base.apk)

很可能是以下代码中.locals 11这个数量不对,或者

    const-string v9, "class1.reader/personal/DataHelper$a1 is run"
    const-string v10, "ok"

寄存器的使用有问题,比如占用了原始程序需要用到的寄存器

.method private a(Lcom/dangdang/reader/domain/ShelfBook;Ljava/lang/String;Landroid/app/Activity;I)I
    .locals 11

    .prologue
	const-string v9, "class1.reader/personal/DataHelper$a1 is run"
	const-string v10, "ok"
	invoke-static {v9,v10}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
    const v9, 0x7f0a0164

    const/4 v8, 0x1

    const/4 v1, -0x1

报错:

Verifier rejected class com.dangdang.reader.dread.format.epub.a: com.dangdang.reader.dread.format.Book com.dangdang.reader.dread.format.epub.a.a(java.lang.String, int, boolean) failed to verify: com.dangdang.reader.dread.format.Book com.dangdang.reader.dread.format.epub.a.a(java.lang.String, int, boolean): [0xC] copy1 v6<-v10 type=Integer cat=3 (declaration of 'com.dangdang.reader.dread.format.epub.a' appears in /data/app/com.dangdang.reader-1/base.apk:classes2.dex)

 

你可能感兴趣的:(smali)