android studio 3.6.2-6040484 available for offline mode

Viewed 2220

i update Android studio yesterday ( 3-4-2020),i get this error :

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':app:mergeDebugResources'.

    Could not resolve all files for configuration ':app:_internal_aapt2_binary'. Could not resolve com.android.tools.build:aapt2:3.6.2-6040484. Required by: project :app No cached version of com.android.tools.build:aapt2:3.6.2-6040484 available for offline mode. No cached version of com.android.tools.build:aapt2:3.6.2-6040484 available for offline mode.

any one can help, thanks

5 Answers

go to ->File -> project structures -> if any suggestions ->update and compile all->apply ->ok and disable offline mode

It's an internet connection problem. it happens to me from time to time. I usually use a VPN to fix it. and make sure your Gradle setting is not in offline mode.

I solved it! Earlier, after I set up everything on my Android Studio, I switched the Gradle Compiler work mode to --offline in Command-line Options in Settings:

File > Settings > Build, Execution, Deployment > Compiler

This solved the issue. Right after I solved it, I saw a similar solution and concluded that copy pasting the problem from build log may not always work, you should read it attentively, stop and think, and make a conscious search.

Let me know if it solves your problem too, if not we will try to come up with something else.

Toogle the offline mode in the upper right section. This should solve your problem

just go to the gradle section on top right corner, and switch off 'Toggle Offline Mode' (on the top toolbar) and you are good to go

Related