Flutter 升级到Android X后出现Firebase问题
失败:生成失败,出现异常Flutter 升级到Android X后出现Firebase问题,flutter,Flutter,失败:生成失败,出现异常 出了什么问题: 无法确定任务“:firebase_core:CompiledBugAIDL”的依赖项 图书馆com.google.firebase:firebase iid正被其他各种图书馆在[[20.0.1,20.0.1]]请求,但解析为17.0.3。禁用插件并使用./gradlew:app:dependencies检查依赖关系树 尝试: 使用--stacktrace选项运行以获取堆栈跟踪。使用--info或--debug选项运行以获得更多日志输出。使用--sca
- 出了什么问题: 无法确定任务“:firebase_core:CompiledBugAIDL”的依赖项 图书馆com.google.firebase:firebase iid正被其他各种图书馆在[[20.0.1,20.0.1]]请求,但解析为17.0.3。禁用插件并使用./gradlew:app:dependencies检查依赖关系树
- 尝试: 使用--stacktrace选项运行以获取堆栈跟踪。使用--info或--debug选项运行以获得更多日志输出。使用--scan运行以获得完整的洞察力
- 得到更多的帮助
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
compileSdkVersion 28
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
lintOptions {
disable 'InvalidPackage'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.hqs.oaao"
minSdkVersion 19
targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
}
}
}
flutter {
source '../..'
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
}
apply plugin: 'com.google.gms.google-services'
项目级梯度:
buildscript {
ext.kotlin_version = '1.3.50'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
classpath 'com.google.gms:google-services:4.3.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
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
}
请将以下依赖项添加到您的应用程序级渐变文件:
实现'com.google.firebase:firebase核心:17.0.3'请将以下依赖项添加到您的应用程序级渐变文件中:
implementation'com.google.firebase:firebase core:17.0.3'您使用的是哪个版本的firebase\u core?添加您的gradleI添加了这一行,出现了此问题。*错误:无法确定任务“:app:CompiledBugJavaWithJavaC”的依赖项。“>无法解析配置“”的所有任务依赖项:app:debugCompileClasspath。“>找不到com.google.firebase:firebase-core:17.0.3。所需人员:project:app>找不到com.google.firebase:firebase核心:17.0.3。所需人员:project:app>project:firebase_coreI添加了此行,出现此问题。*错误:无法确定任务“:app:CompiledBugJavaWithJavaC”的依赖项。“>无法解析配置“”的所有任务依赖项:app:debugCompileClasspath。“>找不到com.google.firebase:firebase-core:17.0.3。所需人员:project:app>找不到com.google.firebase:firebase核心:17.0.3。所需人员:项目:应用程序>项目:firebase_core