java.lang.VerifyError on an obfuscated Android library


We're getting a strange exception for a smaller amount of devices where, apparently the class is not verified because of a method. Unfortunately we're not able to reproduce this with our devices and the stack trace is taken from Fabric.

The stack trace goes like this:

Fatal Exception: java.lang.VerifyError: Verifier rejected class com.example.library.-$$Lambda$d$QOXAMJpwehT8fF2Hmjjy5XM7Qx4: void com.example.library.-$$Lambda$d$ [0xFFFFFFFF] wide register index out of range (15+1 >= 10) (declaration of 'com.example.library.-$$Lambda$d$QOXAMJpwehT8fF2Hmjjy5XM7Qx4' appears in /data/app/com.example.myapp-1/base.apk)
   at com.example.library.MyLibrary.initialize + 317(
   at com.example.myapp.MyApp.onCreate + 152(
   at + 1024(
   at + 5581(
   at + 360(
   at$H.handleMessage + 1579(
   at android.os.Handler.dispatchMessage + 102(
   at android.os.Looper.loop + 154(
   at + 6300(
   at java.lang.reflect.Method.invoke(
   at$ + 887(
   at + 777(
   at + 107(

The code at looks like this:

executeOnBackground(() -> {
    // some code

Where the function is defined as this:

private static void executeOnBackground(Runnable runnable) {
    executeOnBackground(true, runnable);

Which internally calls this:

private static void executeOnBackground(boolean forcePost, Runnable runnable) {
    if (runnable == null)

    if (isOnMainThread() || forcePost)

Note that the stack trace ends before it reaches the functions, so I assume the problem is in lambda functions? Or in the definition? I have no idea how to solve this, but it's the most frequent error that we're getting right now. It happens on random devices and Android OS version does not matter. So, if anyone can help or give some feedback, I'd be appreciated. Thanks.

asked on Stack Overflow Sep 23, 2019 by Furkan Yurdakul

1 Answer


Analysing the stacktrace shows that XPosed seems to be active which is a hooking framework. If you experience this errors only on some devices, it might be because some of your users try to hook your application and modify the code in the respective class MyLibrary.

answered on Stack Overflow Sep 23, 2019 by T. Neidhart

User contributions licensed under CC BY-SA 3.0