在android 5.0以下手机有时会出现Could not find method导致VerifyError进而导致crash问题,写法如下所示:
如上图在android 4.4手机上调用静态方法test1会报错如下:
10-28 16:02:40.913 2792-2792/com.example.myapplication I/dalvikvm: Could not find method com.bumptech.glide.Glide.with, referenced from method com.example.myapplication.TestKt.test2
10-28 16:02:40.913 2792-2792/com.example.myapplication W/dalvikvm: VFY: unable to resolve static method 4: Lcom/bumptech/glide/Glide;.with (Landroid/content/Context;)Lcom/bumptech/glide/Req