[Solved] Unsupported method: BaseConfig.getApplicationIdSuffix() In Android Studio

Today we will know how to solve the problem Unsupported method: BaseConfig.getApplicationIdSuffix, I'm just trying to open source code of android app in android studio then i faced this problem here is how i solved it.

You know when you open old codes in new version of android studio that doesn't meet the old libraries and sdk versions then these problems occur.

build.gradle project file is now available to edit but till you fix all problem you can't see build.gradle module file. so here open the build.gradle file and add depencies classpath with newer version.

dependencies {
classpath 'com.android.tools.build:gradle:3.1.4'

and also add maven repository on this same file under jcenter()
maven {
url 'https://maven.google.com/' name 'Google'}

now open gradle wrapper properties file and replace with the new version,
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip

Now press sync button after a while all should be done, if not it can show error for build version just replace with the latest as my source code contain 23 and i replace it with 27 now after again sync finally it successfully done.