我需要將compile 'com.firebaseui:firebase-ui:0.6.2'
添加到我的gradle模塊應用程序文件中。我將minSdkVersion 15更改爲16.當我同步gradle時,出現此錯誤時,我將鼠標懸停在compile 'com.android.support:appcompat-v7:25.3.1'
添加'com.firebaseui:firebase-ui:0.6.2'後gradle sync的問題
所有com.android.support庫必須使用完全相同的版本規範(混合版本可能會導致運行時崩潰)。發現版本25.3.1, 25.0.0, 23.4.0.
示例include com.android.support:animated-vector-drawable:25.3.1
和com.android.support:design:25.0.0
少...(Ctrl + F1) 存在一些不兼容或可能導致錯誤的庫或工具和庫的組合。其中一種不兼容性是使用不是最新版本的Android支持庫(或者特別是低於targetSdkVersion的版本)進行編譯。
我不明白在哪裏找到了23.4.0版本或無論是需要在這裏解決這個問題是gradle這個文件 -
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.example.*********.firebasechat"
minSdkVersion 16
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.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.firebaseui:firebase-ui:0.6.2'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
這裏的build.gradle(項目:FirebaseChat)
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.google.gms:google-services:3.0.0'
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
主要gradle文件請 –