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…
I am getting desperate at that point, I’ll take any suggestion in order to fix that issue.
2
Answers
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...
You can
try modifying the
target bytecode
&project bytecode
inFile | Settings | Build, Execution, Deployment | Compiler | Java Compiler
-> settarget bytecode
&project bytecode
version to11
.check in
File | Project Structure | Modules
that all of your modules are registered asjava 11
check in
File | Project Structure | Modules
for each module, in theDependencies
tab,Module SDK
is registered asjava 11
check in
File | Project Structure | Platform settings | SDKs
that only oneJDK
is present (to avoid potential conflict)check in
File | Settings | Build, Execution, Deployment | Build Tools | Gradle
thatGradle JVM
isJava 11
delete your
Android Studio
and everything related to it (setting, cache, profile) on your computer and reinstall it