gpt4 book ai didi

android - android:gradle:依赖版本相同

转载 作者:行者123 更新时间:2023-12-03 05:08:09 26 4
gpt4 key购买 nike

我想将fcm添加到我的android项目中。按照指南,我将firebase添加到我的应用程序并插入了依赖项。但是现在我得到了错误

All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 28.0.0, 26.1.0. Examples include com.android.support:animated-vector-drawable:28.0.0 and com.android.support:support-media-compat:26.1.0



关于appcompat依赖(或者也许我之前没有注意到它)
apply plugin: 'com.android.application'

android {
compileSdkVersion 28
defaultConfig {
applicationId "myApp.ginso.com.azul"
minSdkVersion 26
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.firebase:firebase-messaging:17.3.4'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
}

谁能告诉我,我必须改变什么?

最佳答案

问题是 espresso核心正在使用支持库组的较早依赖性。将其增加到最新版本(3.0.2或任何最新版本),或使用以下代码代替您的现有代码从其中明确删除支持组:

androidTestImplementation ('com.android.support.test.espresso:espresso-core:3.0.1') {
exclude group: "com.android.support"
}

希望这能解决您的问题。

关于android - android:gradle:依赖版本相同,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53515466/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com