특정 패키지를 사용하다보면, 최소한의 안드로이드 SDK를 00버전 이상으로 하라고 에러가 뜰 때가 있는데, app > build.gradle
파일을 보면, minSdkVersion
표기가 되어있지만, 음... 어딘가(flutter.minSdkVersion)를 참조하고 있다.
그냥 지우고 숫자를 입력해도 무방은 하다.
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.fluttertest"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdkVersion flutter.minSdkVersion
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
flutter.minSdkVersion
가 어디인고 하니..
~Flutter 설치 폴더~\packages\flutter_tools\gradle\flutter.gradle
안에 아래와 같이 default로 적혀있다.
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 = 16
/** Sets the targetSdkVersion used by default in Flutter app projects. */
static int targetSdkVersion = 33
/**
* Sets the ndkVersion used by default in Flutter app projects.
* Chosen as default version of the AGP version below as found in
*/
static String ndkVersion = "23.1.7779620"
/**
* Specifies the relative directory to the Flutter project directory.
* In an app project, this is ../.. since the app's build.gradle is under android/app.
*/
String source
/** Allows to override the target file. Otherwise, the target is lib/main.dart. */
String target
}
즉, flutter 버전 업과 동시에 바뀌게 되는 것으로 예상되니, 특별한 경우만 build.gradle
파일을 강제로 수정하고, 그냥 냅두는게 낫겠다.
끝.
'Dead Code > Flutter_Dart' 카테고리의 다른 글
[다트] VSCode snippet 생성기(generator) (0) | 2024.04.02 |
---|---|
[플러터] SearchBar Widget 사용하기 (0) | 2023.07.25 |
[플러터] Sheets로 이미지 URL의 EXIF 정보 얻어내기 (0) | 2023.07.24 |
[플러터] 심플 애니메이션 (0) | 2023.07.20 |
[다트] 리스트 중복 제거 (0) | 2023.07.14 |
[플러터] Map 정렬하기 (0) | 2023.07.12 |
[플러터] 구글 Sheets 를 DB로 사용해서 갤러리 만들기 #2 (0) | 2023.07.12 |
[플러터] .json theme 파일사용하기 (0) | 2023.07.11 |
[플러터] widget : Wrap (0) | 2023.07.06 |
[플러터] package : fluttertoast (0) | 2023.06.26 |