在gradle文件中出现'com.android.support:appcompat-v7.27.1.1'的问题 [英] problems with 'com.android.support:appcompat-v7.27.1.1' in the gradle file

查看:2083
本文介绍了在gradle文件中出现'com.android.support:appcompat-v7.27.1.1'的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的依赖关系文件,并且在编译'com.android.support:appcompat-v7.27.1.1'上有一个带下划线的红色文本。

This is my dependencies file and there is an underlined red colored text on the compile 'com.android.support:appcompat-v7.27.1.1'

apply plugin: 'com.android.application'
 android {
compileSdkVersion 27
defaultConfig {
    applicationId "com.abc.mcaproject"
    minSdkVersion 21
    targetSdkVersion 27
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}

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


compile 'com.android.support:appcompat-v7.27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.google.firebase:firebase-database:11.6.0'
implementation 'com.google.firebase:firebase-messaging:11.6.0'
implementation 'com.google.firebase:firebase-auth:11.6.0'
implementation 'com.google.firebase:firebase-storage:11.6.0'
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'
}

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

这是因为我在更改样式中的主题时遇到问题。 xml

This because of this I am having problems changing themes in the styles.xml

推荐答案

当您将鼠标悬停在红线上时,可能会显示像下面这样的图像。 =https://i.stack.imgur.com/iEY4s.png =nofollow noreferrer>

when you hover over the red line it may show you the image like this which I have attached below.

它告诉你的是存在冲突o f某些库中的版本,所以它建议我们添加这些版本。首先为我的情况,它显示了CardView,然后是设计。所以我加入了它。下面是它的代码。

What it tells you is there is a conflict of the version in some libraries so it suggests us to add those. For my case first, it showed for CardView and then for Design. So I added to it. Below is the code for it.

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.android.support.constraint:constraint-layout:1.1.0'
    implementation 'com.payumoney.sdkui:plug-n-play:1.2.0'
    implementation 'com.android.support:cardview-v7:27.1.1'
    implementation 'com.android.support:design:27.1.1'

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



<请加上那些可能是2或更多的那些。
希望有帮助。

so kindly add those it may be 2 or more than that. Hope that helps.

这篇关于在gradle文件中出现'com.android.support:appcompat-v7.27.1.1'的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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