gpt4 book ai didi

android-studio - 使用 groupId com.android.support 和 androidx.* 的依赖不能组合

转载 作者:行者123 更新时间:2023-12-03 23:10:58 25 4
gpt4 key购买 nike

我同步了我的项目,然后我得到了那些 error ,我的 list 代码是:

android {
compileSdkVersion 28
defaultConfig {
applicationId "chtaibi.yahya.footballcards"
minSdkVersion 15
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-
optimize.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
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'
implementation 'com.google.android.gms:play-services-ads:18.1.1'

}

你能帮我吗?

***** 看起来您的帖子主要是代码;请添加更多详细信息。

最佳答案

您可以将现有项目迁移到 AndroidX 通过选择 Refactor > Migrate to AndroidX 从菜单栏。

AndroidX replaces the original support library APIs with packages in the androidx namespace. Only the package and Maven artifact names changed; class, method, and field names did not change.



升级版
compileSdkVersion 29
defaultConfig {

targetSdkVersion 29
buildToolsVersion '29.0.2'


}

您的 dependencies 将要
implementation 'com.google.android.material:material:1.2.0-alpha03'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'

关于android-studio - 使用 groupId com.android.support 和 androidx.* 的依赖不能组合,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57451779/

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