This is because your gradle version in project build.gradle configuration is too old for a newer Android Studio version, like Android Studio 3.6.1,
1. you should change the gradle configuration into a newer one under:
build.gradle(project)->buildscript->dependencies->classpath;
for example, you should change:
classpath 'com.android.tools.build:gradle:2.3.1'
into:
classpath 'com.android.tools.build:gradle:3.1.2'
2. after this, may be you should also change the configuration in gradle-wrapper.properties into a newer version, for example, change:
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
into:
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
3. after this, may be you should also add google()
at:
build.gradle(project)->buildscript->repositories
and
build.gradle(project)->allprojects->repositories