Cannot build SS Android on Android Studio or IntelliJ



I’ve clone newest code from github.
I build the project succesful (output to apk file).
But when I load the project to Android Studio or IntelliJ, it cannot build success.

This is log message on Android Studio:
Gradle sync failed: Unsupported method: AndroidArtifact.getBuildConfigFields().
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) (1 m 5 s 236 ms)

And on IntelliJ:
Warning: No match found for [DefaultTaskExecutionRequest{args=[],projectPath=‘null’}]

Thanks for your helps!


Use the correct version of Android Studio.