작성
·
179
0
Launching lib/main.dart on sdk gphone64 x86 64 in debug mode...
Running Gradle task 'assembleDebug'...
/Users/yoonjoochu/Documents/workspace/android/app/src/debug/AndroidManifest.xml Error:
uses-sdk:minSdkVersion 19 cannot be smaller than version 21 declared in library [:webview_flutter_android] /Users/yoonjoochu/Documents/workspace/build/webview_flutter_android/intermediates/merged_manifest/debug/AndroidManifest.xml as the library might be using APIs not available in 19
Suggestion: use a compatible library with a minSdk of at most 19,
or increase this project's minSdk version to at least 21,
or use tools:overrideLibrary="io.flutter.plugins.webviewflutter" to force usage (may lead to runtime failures)
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugMainManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 19 cannot be smaller than version 21 declared in library [:webview_flutter_android] /Users/yoonjoochu/Documents/workspace/build/webview_flutter_android/intermediates/merged_manifest/debug/AndroidManifest.xml as the library might be using APIs not available in 19
Suggestion: use a compatible library with a minSdk of at most 19,
or increase this project's minSdk version to at least 21,
or use tools:overrideLibrary="io.flutter.plugins.webviewflutter" to force usage (may lead to runtime failures)
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
BUILD FAILED in 4s
┌─ Flutter Fix ─────────────────────────────────────────────────────────────────────────────────┐
│ The plugin webview_flutter_android requires a higher Android SDK version. │
│ Fix this issue by adding the following to the file │
│ /Users/yoonjoochu/Documents/workspace/android/app/build.gradle: │
│ android { │
│ defaultConfig { │
│ minSdkVersion 21 │
│ } │
│ } │
│ │
│ Following this change, your app will not be available to users running Android SDKs below 21. │
│ Consider searching for a version of this plugin that supports these lower versions of the │
│ Android SDK instead. │
│ For more information, see: https://flutter.dev/to/review-gradle-config │
└───────────────────────────────────────────────────────────────────────────────────────────────┘
Error: Gradle task assembleDebug failed with exit code 1
분명 https://pub.dev/packages/webview_flutter 여기선 minsdk를 19로 설정하라고 하는데 왜 오류가 날까요??
답변 2
0
안녕하세요, 인프런 AI 인턴입니다. 성현시스템님께서 겪으신 문제에 대해 설명드리겠습니다.
현재 겪고 계신 문제는 webview_flutter_android
플러그인이 Android SDK의 최소 버전을 21로 요구하기 때문인 것으로 보입니다. 이를 해결하기 위한 몇 가지 방법을 제안드립니다:
minSdkVersion
을 21로 변경: 플러그인이 요구하는 최소 SDK 버전을 맞춰주시면 오류를 해결할 수 있습니다. Flutter 프로젝트의 android/app/build.gradle
파일에서 minSdkVersion
을 21로 설정하십시오. 이는 WebView 기능이 포함된 최근 라이브러리가 최소한의 플랫폼 API를 요구하기 때문입니다.
호환 가능한 라이브러리 찾기: 플러그인의 이전 버전이나 다른 라이브러리를 사용하여 minSdkVersion 19
에서 실행되도록 할 수 있습니다. 그러나 최신 기능을 사용하지 못할 수 있다는 점을 감안해야 합니다.
Override Library: 꺼려지겠지만, tools:overrideLibrary="io.flutter.plugins.webviewflutter"
로 강제 사용을 고려할 수 있습니다. 그러나 이는 실행 시 호환성 문제를 일으킬 수 있으므로 주의가 필요합니다.
아래의 관련 게시물에서 유사한 문제에 대한 해결 방안을 살펴볼 수 있습니다:
이 링크들은 minSdkVersion
및 기타 설정 문제를 해결하는 데 도움이 될 것입니다. 질문자님께서는 minSdkVersion
을 플러그인 요구사항에 맞춰 조정하는 방식으로 시작해 보시기 바랍니다.
저는 질문자님의 이해를 돕고자 지식공유자님의 기존 답변을 참고하여 유사한 답변 링크를 추천해드리고 있습니다. 현재 베타 기능으로 답변이 만족스럽지 않을 수 있는 점 양해 부탁드립니다. 🙏 추가적으로 궁금한 점이 있으시면, 이어서 질문해 주세요. 곧 지식공유자께서 답변해 주실 것입니다.
안녕하세요!
이전 질문과 마찬가지로 원격신청 부탁드립니다.
만약에 버전을 올려서 실행이 된다면 그대로 진행하시면 됩니다.
감사합니다!