Fixed
Status Update
Comments
an...@google.com <an...@google.com> #3
Thank you for your patience while our engineering team worked to resolve this issue. A fix for this issue is now available in:
- Android Studio Ladybug Feature Drop | 2024.2.2 Canary 6
- Android Gradle Plugin 8.8.0-alpha06
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
Thank you for taking the time to submit feedback — we really appreciate it!
Description
Certain Android SDK annotations are available only in the stub jar (android.jar) and not in attached sources because they are injected by Metalava at build time. This discrepancy confuses certain IntelliJ inspections which search for annotations in sources instead of bytecode (presumably to handle annotations with source retention).
Most notably this affects nullability annotations, which Metalava injects in many
java.*
classes. For example, the following code snippet does not trigger a nullability warning in the editor, even though it should:I have a solution ready, partly as a side effect of my recent deep dive into b/366309455 . I'll upload soon.