Unsupported method: BaseConfig.getApplicationIdSuffix()
First, open your application module build.gradle file.
Check the classpath according to your project dependency. If not change the version of this classpath.
from:
classpath 'com.android.tools.build:gradle:1.0.0'
To:
classpath 'com.android.tools.build:gradle:2.3.2'
or higher version according to your gradle of android studio.
If its still problem, then change buildToolsVersion:
From:
buildToolsVersion '21.0.0'
To:
buildToolsVersion '25.0.0'
then hit 'Try again' and gradle will automatically sync. This will solve it.
Alright I figured out how to fix this issue.
- Open build.gradle and change the gradle version to the recommended version:
classpath 'com.android.tools.build:gradle:1.3.0'
toclasspath 'com.android.tools.build:gradle:2.3.2'
- Hit
'Try Again'
- In the messages box it'll say
'Fix Gradle Wrapper and re-import project'
Click that, since the minimum gradle version is3.3
- A new error will popup and say
The SDK Build Tools revision (23.0.1) is too low for project ':app'. Minimum required is 25.0.0
- HitUpdate Build Tools version and sync project
- A window may popup that says
Android Gradle Plugin Update recommended
, just update from there.
Now the project should be runnable now on any of your android virtual devices.
For Android Studio 3 I need to update two files to fix the error:--
1. app/build.gradle
buildscript {
repositories {
jcenter()
mavenCentral()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
}
}
2. app/gradle/wrapper/gradle-wrapper.properties
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip