【发布时间】:2022-01-03 11:37:43
【问题描述】:
最近我在我的 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)
我已经尝试了前两个建议,但应用程序仍然无法运行。
【问题讨论】:
标签: android firebase flutter gradle