크로스 플랫폼/Flutter <Dart>

[flutter] android minSdkVersion 변경하기 (flutter sdk 3.13)

TaeGyeong Lee 2024. 1. 3. 15:30

또 달라졌습니다...

 

버전 변경

프로젝트에 사용하는 flutter sdk 디렉토리/packages/flutter_tools/gradle/src/main/groovy/flutter.groovy 에 있습니다.

/**
 * For apps only. Provides the flutter extension used in app/build.gradle.
 *
 * The versions specified here should match the values in
 * packages/flutter_tools/lib/src/android/gradle_utils.dart, so when bumping,
 * make sure to update the versions specified there.
 *
 * Learn more about extensions in Gradle:
 *  * https://docs.gradle.org/8.0.2/userguide/custom_plugins.html#sec:getting_input_from_the_build
*/
class FlutterExtension {
    /** Sets the compileSdkVersion used by default in Flutter app projects. */
    static int compileSdkVersion = 33

    /** Sets the minSdkVersion used by default in Flutter app projects. */
    static int minSdkVersion = 19

    /** Sets the targetSdkVersion used by default in Flutter app projects. */
    static int targetSdkVersion = 33

 

minSdkVersion 을 바꾸어 주시면 됩니다.

이렇게 자주 바꾸어 놓으니 위 방법 말고 프로젝트/app/build.gradle 에서 직접 버전을 명시하는 방법이 좋겠습니다.