由于皮棉错误而无法生成签名的apk

问题描述 投票:0回答:1

我在生成签名的APK时遇到麻烦。屏幕上显示棉绒错误以下错误显示所有com.android.support库都必须使用完全相同的版本规范(混合版本可能导致运行时崩溃)。找到版本28.0.0,27.1.0。例子包括'com.android.support:animated-vector-drawable:28.0.0'和'com.android.support:exifinterface:27.1.0'

build.gradle文件中的依赖项如下:

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support:cardview-v7:28.0.0'
    implementation 'com.android.support:design: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.android.support:recyclerview-v7:28.0.0'
    implementation 'com.android.support:support-v4:28.0.0'

    //picasso libraray
    implementation 'com.squareup.picasso:picasso:2.71828'

    //retrofit libraries

    implementation 'com.squareup.retrofit2:retrofit:2.5.0'
    implementation 'com.squareup.okhttp3:okhttp:4.3.1'
    implementation 'com.squareup.retrofit2:converter-gson:2.5.0'
    implementation 'com.squareup.retrofit2:converter-scalars:2.5.0'
}

在此行

implementation 'com.android.support:appcompat-v7:28.0.0'

发生棉绒错误

android build.gradle apk lint
1个回答
0
投票

AndroidX将原始支持库API替换为androidx名称空间。仅软件包和Maven工件名称改变类,方法和字段名称未更改。

读取迁移到AndroidX。您应该迁移到AndroidX。

使用Android Studio 3.2及更高版本,您可以迁移现有的通过从中选择Refactor> Migrate to AndroidX将项目投影到AndroidX菜单栏。

然后在下面的[[AndroidX部分中添加。

build.gradle
© www.soinside.com 2019 - 2024. All rights reserved.