Android依赖项错误编译'com.android.support:appcompat-v7:26.+' [英] Android dependency error compile 'com.android.support:appcompat-v7:26.+'

查看:61
本文介绍了Android依赖项错误编译'com.android.support:appcompat-v7:26.+'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在添加firebaseui依赖项之前,这是可行的.现在我得到了:日志

This was working before I added firebaseui dependency. Now I'm getting this: log

它的红色内衬编译为"com.android.support:appcompat-v7:26.+",当我将鼠标悬停在它上面时,它说所有库必须具有完全相同的规范版本".该版本就是项目创建时的版本.

Its red lining compile 'com.android.support:appcompat-v7:26.+' and when I hover over it, it says "all libraries must be exact same specification version". That version was what was there when the project was created.

app/build.gradle:

app/build.gradle:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    buildToolsVersion "26.0.1"
    defaultConfig {
        applicationId "com.android.adarak"
        minSdkVersion 21
        targetSdkVersion 26
        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:26.+'
    compile 'com.android.support:support-v4:26.+'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    compile 'com.google.firebase:firebase-auth:10.0.1'
    //compile 'com.firebaseui:firebase-ui-auth:2.3.0'
    compile 'com.firebaseui:firebase-ui:2.3.0'
    testCompile 'junit:junit:4.12'
}


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

推荐答案

firebaseui内部依赖于特定版本的Android支持库. firebase ui配置包含26.0.1作为所需的支持库版本.

The firebaseui internally has a dependency on a specific version of Android support library. The firebase ui configuration contains 26.0.1 as the required support library version.

但是您的gradle文件依赖于26. +,它告诉gradle使用26.x.x系列中的最新版本,这可能与26.0.1不同.您可以使用firebase-ui(26.0.1)所需的特定版本来解决此问题.

However your gradle file has a dependency on 26.+ which tells gradle to use the latest in the 26.x.x series and this could be different from 26.0.1. You can solve the issue by using the specific version required by firebase-ui (26.0.1)

如下所示更改gradle文件,

Change the gradle file as shown below,

compile 'com.android.support:appcompat-v7:26.0.1'
compile 'com.android.support:support-v4:26.0.1'

这篇关于Android依赖项错误编译'com.android.support:appcompat-v7:26.+'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆