【发布时间】:2019-09-07 17:00:54
【问题描述】:
我已经尝试了我在网上看到的所有东西来解决这个问题。降级版本在 gradle 或重建等中添加了一些东西。简而言之,我正在尝试使用 firebase。
对于我尝试的每个解决方案,错误都会发生变化,但它并没有结束。这是我神秘的 gradles 和 pubspec。在 android/app/gradle 中:
apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.app"
minSdkVersion 16
targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
signingConfig signingConfigs.debug
}
}
}
dependencies {
implementation 'com.google.firebase:firebase-analytics:17.0.1'
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'
}
在 android/gradle 中
...
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.google.gms:google-services:4.2.0'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
...
在 pubspech.yaml 中:
path_provider: ^1.2.0
sembast: ^2.0.1+2
flutter_bloc: ^0.21.0
equatable: ^0.5.1
cloud_firestore: ^0.12.9+3
如果有人帮助我也尝试了应用插件 google 服务或将 google 服务更改为 3.2.1 或 minsdkversions,我将不胜感激..
【问题讨论】: