W System.err: java.lang.VerifyError: Verifier rejected class xxxx
阿新 • • 發佈:2018-12-18
類似這種報錯
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