ERROR: Could not find com.android.tools.build:gradle:3.5.2. Searched in the following locations: -
https://dl.google.com/dl/android/maven2/com/a
I also had this problem on Linux (ubuntu)
I tried different ways but the problem still didn't work out.
Finally, I remove /home/(user)/.gradle directory and restart Android Studio and this error fixed.
/home/(user)/.gradle