티스토리 뷰



자주 발생하는 오류는 아니지만 예전 소스를 import 하거나 Android studio version 을 update 하면서 종종 아래와 같은 Gradle sync 오류가 발생하곤 한다.

 

Error: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.
cs



300x250
300x250



Solution

Gradle version 을 업데이트해주자.

 

◼ Project build.gradle

하단의 Gradle version 을 '1.2.3' -> '3.5.3' 로 변경해주자

 

◼ Gradle-wrapper.properties (gradle/wrapper/gradle-wrapper.properties)

하단의 Gradle version 을 'gradle-2.2.1-all.zip' -> 'gradle-5.4.1-all.zip' 로 변경해 주자.



Reference

참고로 Gradle 업데이트 시 하단과 같이 Android 플러그인 버전과 Gradle 버전을 맞춰줘야 한다.

- https://developer.android.com/studio/releases/gradle-plugin.html

- https://services.gradle.org/distributions/

 

플러그인 버전 필요한 Gradle 버전
1.0.0~1.1.3 2.2.1~2.3
1.2.0~1.3.1 2.2.1~2.9
1.5.0 2.2.1~2.13
2.0.0~2.1.2 2.10~2.13
2.1.3~2.2.3 2.14.1+
2.3.0+ 3.3+
3.0.0+ 4.1+
3.1.0+ 4.4+
3.2.0~3.2.1 4.6+
3.3.0~3.3.2 4.10.1+
3.4.0~3.4.1 5.1.1+
3.5.0-3.5.3 5.4.1+
3.6.0~3.6.4 5.6.4+
4.0.0+ 6.1.1+
4.1.0+ 6.5+
4.2.0+ 6.7.1+
7.0 7.0
7.1 7.2
7.2 7.33
7.3 7.4
7.4 7.5
8.0 8.0

 

Android studio 버전 필요한 플러그인 버전
Flamingo | 2022.2.1 3.2~8.0
Electric Eel | 2022.1.1 3.2~7.4
Dolphin | 2021.3.1 3.2~7.3
Chipmunk | 2021.2.1 3.2~7.2
Bumblebee | 2021.1.1 3.2~7.1
Arctic Fox | 2020.3.1 3.1~7.0



728x90
댓글