flutter - 当我尝试将firebase集成到在android中运行的flutter 1.9.1应用程序中并且我得到错误sqfile
问题描述
更新到 android 1.9.1 修补程序 6 后,我试图在 android 9 上运行我的应用程序,并且在我运行应用程序时继续出现相同的错误
我将所有依赖项和插件更新到最新版本
这是我所有的配置
这是我的项目 yml 依赖项
environment:
sdk: ">=2.4.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
flutter_crashlytics: ^1.0.0
rxdart: 0.22.2
kiwi: ^0.2.0
http: ^0.12.0+2
shared_preferences: ^0.5.3+4
image_picker: ^0.6.1+4
photo_view: ^0.5.0
cached_network_image: ^1.1.1
smooth_star_rating: ^1.0.2
carousel_slider: ^1.3.1
dio: ^2.1.0
url_launcher: ^5.1.3
webview_flutter: ^0.3.5+3
flare_flutter: ^1.7.1
geolocator: ^5.1.3
path_provider: ^1.4.4
sqflite: ^1.1.7+2
gradle 版本 6.0.1 android /build.gradle
ext.kotlin_version = '1.3.50'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.2.0'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
android/app/build.gradle
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
apply plugin: 'com.google.gms.google-services'
并让我说这个错误,我有最新版本的 sqflite
[ ] > Task :app:processDebugGoogleServices FAILED
[ ] Parsing json file: ***\code\mobile-app\android\app\google-services.json
[ +1 ms] *********************************************************
[ ] WARNING: This version of sqflite will break your Android build if it or its dependencies aren't compatible with AndroidX.
[ ] See ..... for more information on the problem and how to fix it.
[ ] This warning prints for all Android build failures. The real root cause of the error may be unrelated.
[ ] *********************************************************
[ ] 42 actionable tasks: 4 executed, 38 up-to-date
解决方案
实际上错误是gradle文件和android清单不匹配
推荐阅读
- python - 构建 HTML 烧瓶网页 - 输入取决于启动
- android - 如何在android studio中安装androidsdk文档,在哪里可以下载?
- spring-boot - spring boot 与外键一对一
- google-sheets - 计算文本字段中的数字
- jestjs - 何时在 Jest 中使用 expect.stringContaining 而不是 toContain 进行子字符串匹配
- python - 将 cx_freeze 与 feedparser 导入一起使用时出错:ModuleNotFoundError: No module named 'sgmllib'
- listview - JavaFX - 可平移列表视图
- c# - 我如何在 DiscordGuild() dsharpplus 上解决此错误
- python - R 函数密度()的 Python 等效项(即相同的输出)是什么?
- javascript - 从数组中删除数组中的对象