I recently updated my android studio from 3.5 to 3.6.2. After that for all my projects I receive below error even for new projects with clean and empty activity.
Task :app:preBuild UP-TO-DATE
Task :app:preDebugBuild UP-TO-DATE
Task :app:compileDebugAidl NO-SOURCE
Task :app:generateDebugBuildConfig UP-TO-DATE
Task :app:compileDebugRenderscript NO-SOURCE
Task :app:javaPreCompileDebug FAILED
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':app:javaPreCompileDebug'.
Could not resolve all files for configuration ':app:debugCompileClasspath'. Could not find collection.jar (androidx.collection:collection:1.0.0). Searched in the following locations: https://dl.google.com/dl/android/maven2/androidx/collection/collection/1.0.0/collection-1.0.0.jar
Could not find lifecycle-common.jar (androidx.lifecycle:lifecycle-common:2.0.0). Searched in the following locations: https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-common/2.0.0/lifecycle-common-2.0.0.jar
Could not find core-common.jar (androidx.arch.core:core-common:2.0.0). Searched in the following locations: https://dl.google.com/dl/android/maven2/androidx/arch/core/core-common/2.0.0/core-common-2.0.0.jar
Could not find annotation.jar (androidx.annotation:annotation:1.0.0). Searched in the following locations: https://dl.google.com/dl/android/maven2/androidx/annotation/annotation/1.0.0/annotation-1.0.0.jar
Could not find constraintlayout-solver.jar (androidx.constraintlayout:constraintlayout-solver:1.1.3). Searched in the following locations: https://dl.google.com/dl/android/maven2/androidx/constraintlayout/constraintlayout-solver/1.1.3/constraintlayout-solver-1.1.3.jar
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.
Get more help at https://help.gradle.org
BUILD FAILED in 1s 2 actionable tasks: 1 executed, 1 up-to-date