플러터로 설정하면 다른 안드로이드 스튜디오에서 생성하는 플젝과는 다르게 root dir 에 따로 build.gradle 이 생기지는 않는다.
대신 안드로이드 앱을 작업하고 있다면 android/app/build.gradle 쪽이 대신한다.
android {
namespace "com.example.untitled"
compileSdkVersion 34
ndkVersion flutter.ndkVersion
같은 거 설정할 때 이곳에서 진행하면 됨
관련 설정하는 경우는 다음과 같은 오류가 발생했을 때
1. Dependency 'androidx.webkit:webkit:1.8.0' requires libraries and applications that depend on it to compile against version 34 or later of the Android APIs. :app is currently compiled against android-33. Also, the maximum recommended compile SDK version for Android Gradle plugin 8.0.2 is 33. Recommended action: Update this project's version of the Android Gradle plugin to one that supports 34, then update this project to use compileSdk of at least 34. Note that updating a library or application's compileSdk (which allows newer APIs to be used) can be done separately from updating targetSdk (which opts the app in to new runtime behavior) and minSdk (which determines which devices the app can be installed on).
2. Dependency 'androidx.browser:browser:1.6.0' requires libraries and applications that depend on it to compile against version 34 or later of the Android APIs. :app is currently compiled against android-33. Also, the maximum recommended compile SDK version for Android Gradle plugin 8.0.2 is 33. Recommended action: Update this project's version of the Android Gradle plugin to one that supports 34, then update this project to use compileSdk of at least 34. Note that updating a library or application's compileSdk (which allows newer APIs to be used) can be done separately from updating targetSdk (which opts the app in to new runtime behavior) and minSdk (which determines which devices the app can be installed on).
[flutter] Inwebappview 설정 시 오류 중 하나 (0) | 2024.04.25 |
---|