切换导航
{{systemName}}
{{ info.Title }}
{{info.Title}}
{{ menu.Title }}
{{menu.Title}}
登录
|
退出
搜索
flutter 错误:uses-sdk:minSdkVersion 16 不能小于库中声明的版本20
作者:ych
### 介绍 报错信息 flutter 错误:uses-sdk:minSdkVersion 16 不能小于库中声明的版本20 ``` E:\code\flutter\debug\AndroidManifest.xml Error: uses-sdk:minSdkVersion 16 cannot be smaller than version 20 declared in library [:qr_code_scanner] E:\code\flutter\build\qr_code_scanner\intermediates\merged_manifest\debug\AndroidManifest.xml as the library might be using APIs not available in 16 Suggestion: use a compatible library with a minSdk of at most 16, or increase this project's minSdk version to at least 20, or use tools:overrideLibrary="net.touchcapture.qr.flutterqr" to force usage (may lead to runtime failures) E:\code\flutter\build\qr_code_scanner\intermediates\merged_manifest\debug\AndroidManifest.xml as the library might be using APIs not available in 16 Suggestion: use a compatible library with a minSdk of at most 16, or increase this project's minSdk version to at least 20, or use tools:overrideLibrary="net.touchcapture.qr.flutterqr" to force usage (may lead to runtime failures) ``` ### 解决方案 打开这个文件`android/app/build.gradle` In your app Navigate to`android/app/build.gradle` ``` defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "com.example.flutter_test2" // You can update the following values to match your application needs. // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. minSdkVersion flutter.minSdkVersion targetSdkVersion flutter.targetSdkVersion versionCode flutterVersionCode.toInteger() versionName flutterVersionName } ``` minSdkVersion版本改为20 change minsdk from 16 to 20 ``` defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). minSdkVersion 16 // change it to 20 } ```
相关推荐
flutter tabbar点击切换加载两次如何解决
flutter报错Error: Member not found
flutter报错 Error: Connection refused
评论区
先去登录
版权所有:机遇屋在线 Copyright © 2021-2025 jiyuwu Co., Ltd.
鲁ICP备16042261号-1