Tag Archives: Error:Unsupported method: BaseConfig.getApplicationIdSuffix().

Android studio import project, error e rror:Unsupported method : BaseConfig.getApplicationIdSuffix().

For the third-party library downloaded from GitHub clone, due to the long time interval, the gradle version is inconsistent with the native version. If it is imported into Android studio, an error will be reported. The error message is as follows:

E rror:Unsupported method : BaseConfig.getApplicationIdSuffix().
The version of Gradle you connect to does not support that method.
To resolve the problem you can change/upgrade the target version of Gradle you connect to.
Alternatively, you can ignore this exception and read other information from the model.

Consult IDE log for more details (Help | Show Log)

Search on stackoverflow and find the solution as follows:

Step 1: modify the build. Gradle file of the project, find dependencies, and modify the classpath

classpath 'com.android.tools.build:gradle:1.0.0'
change to:
classpath 'com.android.tools.build:gradle:2.3.2'

Screenshot:

Step 2: after modifying the version of build.gradle in the previous step, the version of gradle in the gradle wrapper.properties file also needs to be modified. Since the version of gradle in build.gradle has been upgraded to 2.3.2 in the previous step, the gradle in gradle wrapper.properties needs at least 3.3

Modify directly: distributionurl

distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip

Photo:

Reference 38142142;:

https://stackoverflow.com/questions/44546849/unsupported-method-baseconfig-getapplicationidsuffix