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
Similar Posts:
- Plugin is too old, please update to a more recent
- [Solved] Android Studio Error: Could not initialize class com.android.sdklib.repository.AndroidSdkHandler
- [Solved] Could not find method google() for arguments [] on repository container,rn react-native-camera …
- [Solved] Android Studio Error: Could not initialize class com.android.sdklib.repository.AndroidSdkHandler
- Android Studio ERROR: SSL peer shut down incorrectly (Solved)
- Could not find com.android.tools.build:gradle:3.3.0.
- Error:(1, 0) Plugin with id ‘android’ not found.
- Error:Failed to open zip file. Gradle‘s dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
- [Soloved] Gradle sync failed: Failed to open zip file
- gradle: failed to find Build Tools revision 23.0.1 [Three Mehods to Solve]