title: How to solve error "FAILURE:Build failed with an exception" in android studio?
body: <p>FAILURE: Build failed with an exception.</p>
  
  <ul>
  <li><p>What went wrong:
  Execution failed for task ':app:mergeDebugResources'.</p>
  
  <blockquote>
    <p>Could not resolve all files for configuration ':app:_internal_aapt2_binary'.
    Could not resolve com.android.tools.build:aapt2:3.6.0-6040484.
     Required by:
         project :app
    No cached version of com.android.tools.build:aapt2:3.6.0-6040484 available for offline mode.
    No cached version of com.android.tools.build:aapt2:3.6.0-6040484 available for offline mode.</p>
  </blockquote></li>
  <li><p>Try:
  Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.</p></li>
  <li><p>Get more help at <a href="https://help.gradle.org" rel="nofollow noreferrer">https://help.gradle.org</a></p></li>
  </ul>
  
  <p>BUILD FAILED in 267ms
  5 actionable tasks: 1 executed, 4 up-to-date</p>