flogger
flogger copied to clipboard
Crash in Android: No caller found on the stack for: com.google.common.flogger.FluentLogger
Using the Flogger library with the latest Android Studio Koala Feature Drop | 2024.1.2, AGP 8.6 causes this crash.
Not seeing before updating the Android Studio and AGP.
Caused by java.lang.IllegalStateException: no caller found on the stack for: com.google.common.flogger.FluentLogger
at com.google.common.flogger.backend.system.StackBasedCallerFinder.findLoggingClass(StackBasedCallerFinder.java:46)
at com.google.common.flogger.FluentLogger.forEnclosingClass(FluentLogger.java:68)
at com.myapp.utils.DebugLogger.<clinit>(DebugLogger.java)
at com.google.common.util.concurrent.AbstractTransformFuture$AsyncTransformFuture.doTransform(AbstractTransformFuture.java:229)
at com.google.common.util.concurrent.AbstractTransformFuture$AsyncTransformFuture.doTransform(AbstractTransformFuture.java:216)
at com.google.common.util.concurrent.AbstractTransformFuture.run(AbstractTransformFuture.java:129)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at com.myapp.AppModule$1.lambda$newThread$0(AppModule.java:118)
at java.lang.Thread.run(Thread.java:919)
Could you please share some more details like
- how the logger was configured
- the log call that triggered this
- the class/method containing the log call
Maybe there's some ProGuard magic going on that rewrote the class?
Looks like the enclosing class that the logger is trying to find is just com.myapp.utils.DebugLogger.
Hi @fanwgwg Please assign this issue to me. I want to work on this and investigate the root cause of the crash.
Thank you Shivam Thorat