gpt4 book ai didi

android studio error-混合版本会导致运行时崩溃

转载 作者:塔克拉玛干 更新时间:2023-11-02 21:50:14 25 4
gpt4 key购买 nike

将“com.firebaseui:firebase-ui-auth:1.0.0”添加到依赖项后出现错误。当我从 gradle 中删除 'com.firebaseui:firebase-ui-auth:1.0.0' 时,错误消失了。代码和图片如下请帮忙

apply plugin: 'com.android.application'

android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.example.a.chatapp"
minSdkVersion 22
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.3.0'



compile 'com.firebaseui:firebase-ui:0.3.1'






compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'

enter image description here

最佳答案

这里存在错误!

compile 'com.android.support:appcompat-v7:25.3.1'

All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 25.3.1, 25.3.0. Examples include 'com.android.support:animated-vector-drawable:25.3.0' and 'com.android.support:mediarouter-v7:24.0.0'

看到这个例子包括 'com.android.support:animated-vector-drawable:25.3.0''com.android.support:mediarouter-v7:24.0.0'

只需将这些代码添加到依赖项中,确保版本相同。

只需更新 build.gradle 文件:-

compile 'com.android.support:animated-vector-drawable:25.3.1'
compile 'com.android.support:mediarouter-v7:25.3.1'

关于android studio error-混合版本会导致运行时崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42960731/

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