I recently got forced to upgrade to Java-11 because of Google requiring SDK 33 for all play store apps. The problem is that the annotations classes got unbundled from java-11 and now have to be specified as an external dependency. This was my fix for the problem, which I think would work (but can't test since the upgrade) for older Java versions as well, since it would override the internal annotation class:
I recently got forced to upgrade to Java-11 because of Google requiring SDK 33 for all play store apps. The problem is that the annotations classes got unbundled from java-11 and now have to be specified as an external dependency. This was my fix for the problem, which I think would work (but can't test since the upgrade) for older Java versions as well, since it would override the internal annotation class: