skip to Main Content

I updated my Android studio to the latest version 2020.3.1, including Android Gradle Plugin v7.0.2 and Gradle v7.2.
After some configuration nightmare (as always with AS, no surprises there), I managed to make my project compile and run, everything seemed smooth. But I realized not long after that the "auto-build" feature is actually stuck.
Basically my AS is not auto building while I am coding, meaning that I cannot even see basic error like typos and such until I actually build my project with CTRL+B.

I can see that I have an error in the auto-build section telling me:
Error:java: warning: source release 11 requires target release 11

I tried pretty much all JDK possible with different config, from 1.8 to 17. All of them trigger that error…

Here is how it looks like:
enter image description here

I am getting desperate at that point, I’ll take any suggestion in order to fix that issue.

2

Answers


  1. Chosen as BEST ANSWER

    Well, nothing helped, so I deleted fully my Android Studio and reinstalled the latest Canary version, which solved the issue. I honestly think this is the best/fastest course of action for this kind of problem, unfortunately...


  2. You can

    • try modifying the target bytecode & project bytecode in File | Settings | Build, Execution, Deployment | Compiler | Java Compiler -> set target bytecode & project bytecode version to 11.

    • check in File | Project Structure | Modules that all of your modules are registered as java 11

    • check in File | Project Structure | Modules for each module, in the Dependencies tab, Module SDK is registered as java 11

    • check in File | Project Structure | Platform settings | SDKs that only one JDK is present (to avoid potential conflict)

    • check in File | Settings | Build, Execution, Deployment | Build Tools | Gradle that Gradle JVM is Java 11

    • delete your Android Studio and everything related to it (setting, cache, profile) on your computer and reinstall it

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search