gpt4 book ai didi

android - 库必须使用完全相同的版本规范(混合版本会导致运行时崩溃)。发现版本 28.0.0-alpha1、26.1.0

转载 作者:塔克拉玛干 更新时间:2023-11-02 23:51:49 24 4
gpt4 key购买 nike

所有 com.android.support 库必须使用完全相同的版本

specification (mixing versions can lead to runtime crashes). Found versions 28.0.0-alpha1, 26.1.0. Examples include com.android.support:animated-vector-drawable:28.0.0-alpha1 and com.android.support:customtabs:26.1.0 less... (Ctrl+F1) There are some combinations of libraries, or tools and libraries, that are incompatible, or can lead to bugs. One such incompatibility is compiling with a version of the Android support libraries that is not the latest version (or in particular, a version lower than your targetSdkVersion).

我的 gradle 依赖项:-

implementation 'com.google.firebase:firebase-ads:15.0.1'
implementation 'com.google.firebase:firebase-core:16.0.1'

关于此依赖项的警告 ------------------------------

implementation 'com.android.support:appcompat-v7:28.0.0-alpha1'
testImplementation 'junit:junit:4.12'
implementation 'com.google.android.gms:play-services-vision:15.0.2'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.3.+'
implementation 'com.memetix:microsoft-translator-java-api:0.6.2'
implementation 'com.google.firebase:firebase-crash:16.0.1'
implementation 'com.facebook.android:audience-network-sdk:4.+'

enter image description here

enter image description here >

最佳答案

某些东西正在使用旧库,罪魁祸首是 firebase-core:16~;

经过多次尝试,我解决了这个问题。

来自 this answere this answer我解决了错误。

You need to manually add dependencies that are conflicting. (To find conflicting dependencies an easy way is to hover over highlighted errors.) You can either downgrade your appcompat library to the given/hinted one which is not recommended or manually declare those dependicies.

我今天将此代码与所有更新的库一起使用并解决了错误:

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])

implementation 'com.android.support:appcompat-v7:28.0.0-rc01'

implementation 'com.android.support.constraint:constraint-layout:1.1.2'

//this thing is carusing error, to solve - see hints and manually add them.

implementation 'com.google.firebase:firebase-core:16.0.1'

implementation 'com.android.support:support-media-compat:28.0.0-rc01'

implementation 'com.android.support:support-v4:28.0.0-rc01'


//implementation 'com.android.support:appcompat-v7:25.2.0'
/*implementation ("com.google.firebase:firebase-core:16.0.1"){
exclude group: 'com.android.support'
}
*/

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'
}

这种行为让新开发者头疼。

如果这解决了您的问题,请让其他人也知道。快乐编码。

更新

注意:不要忘记检查是否有其他库添加到您的项目中导致警告。

其工作证明。 enter image description here

关于android - 库必须使用完全相同的版本规范(混合版本会导致运行时崩溃)。发现版本 28.0.0-alpha1、26.1.0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51948342/

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