【问题标题】:Gradle dependencies versionGradle 依赖版本
【发布时间】:2017-08-21 08:49:33
【问题描述】:

您好,我应该担心这个 gradle 警告/错误吗?

apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.2"
    defaultConfig {
        applicationId "com.example.bananasandpajamas.pilloclock"
        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(include: ['*.jar'], dir: 'libs')
    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' <---- THIS ONE
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    testCompile 'junit:junit:4.12'
    //compile 'com.google.firebase:firebase-core:10.2.1'
    //compile 'com.google.firebase:firebase-auth:10.2.1'
    //compile 'com.google.android.gms:play-services-auth:10.2.1'
    compile 'com.firebaseui:firebase-ui-auth:1.2.0'

}
apply plugin: 'com.google.gms.google-services'

它警告我有两个版本的 android.support:appcompat。 但是当我试图将其降级到 25.1.1 时。它警告我应该使用最新的。

编辑:

错误消息:所有 com.android.support 库必须使用确切的 相同的版本规范(混合版本可能会导致运行时 崩溃)。找到版本 25.3.1、25.1.1。例子包括 com.android.support:animated-vector-drawable:25.3.1 和 com.android.support:cardview-v7:25.1.1

【问题讨论】:

标签: android firebase gradle android-gradle-plugin firebaseui


【解决方案1】:

您的构建版本是buildToolsVersion "25.0.2"

你的依赖版本是

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

它将如何编译?

在 appcompat 版本中更改您的版本或更新您的 android studio..

【讨论】:

  • 我不知道为什么,但它的编译和我的 android studio 已更新。
  • 我很确定它与firebaseUI有关,我认为它已经过时了。
  • 我遇到了同样的问题......当我更新它时,问题解决了,所以我建议这个想法
  • 是的,我最终使用了旧版本的 appcompat (25.1.1)。谢谢你。 :P.
猜你喜欢
  • 2018-06-02
  • 1970-01-01
  • 2023-04-08
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-12-26
  • 2023-03-26
相关资源
最近更新 更多