In my case, I also had an additional “standalone switch” to the one that was in Gradle.
Switch to:
File > Settings > Build, Execution, Deployment > Compiler
There I removed --offline in the Command-line Options . I used to try to speed things up a bit with Android Studio, and that was one of the changes I made.
After the reboot, everything was fine (and I turned on both autonomous parts again).
source share