作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
最近我在我的 flutter 项目中添加了 Firebase。为了使用 firebase 数据库服务,我添加了 cloud_firebase 包。但是在添加这个包之后,我的应用程序没有运行并且给了我一个异常:
BUILD FAILED in 31s
The plugin cloud_firestore requires a higher Android SDK version.
Fix this issue by adding the following to the file C:\Users\Jaguar\Desktop\AppDevelopment\acadmt\android\app\build.gradle:
android {
defaultConfig {
minSdkVersion 19
}
}
Note that your app won't be available to users running Android SDKs below 19.
Alternatively, try to find a version of this plugin that supports these lower versions of the Android SDK.
Exception: Gradle task assembleDebug failed with exit code 1
异常消息还建议以下建议 :
Suggestion: use a compatible library with a minSdk of at most 16,
or increase this project's minSdk version to at least 19,
or use tools:overrideLibrary="io.flutter.plugins.firebase.firestore" to force usage (may lead to runtime failures)
我已经尝试了前两个建议,但该应用程序仍然无法正常工作。
最佳答案
将 minSdkVersion 更改为 21 后它将起作用。
defaultConfig {
minSdkVersion 21
targetSdkVersion 30
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
关于android - 添加 cloud_firebase 包后,我的 Flutter App 没有运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70106952/
最近我在我的 flutter 项目中添加了 Firebase。为了使用 firebase 数据库服务,我添加了 cloud_firebase 包。但是在添加这个包之后,我的应用程序没有运行并且给了我一
我是一名优秀的程序员,十分优秀!