Code Dreamer
Code Dreamer

Reputation: 21

Unable to generate signed apk due to lint errors

I am having trouble in generating signed apk. Lint errors displayed on screen Following error shows All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 28.0.0, 27.1.0. Examples include 'com.android.support:animated-vector-drawable:28.0.0' and 'com.android.support:exifinterface:27.1.0'

Dependencies in build.gradle file is below:

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

On this line

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

lint error occurred

Upvotes: 0

Views: 177

Answers (1)

IntelliJ Amiya
IntelliJ Amiya

Reputation: 75778

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.

Read official guideline about - Migrating to AndroidX. You should migrate to AndroidX.

With Android Studio 3.2 and higher, you can migrate an existing project to AndroidX by selecting Refactor > Migrate to AndroidX from the menu bar.

dependencies will be

    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'com.google.android.material:material:1.1.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'

Then add below in your build.gradle section.

 android {
        lintOptions {
            checkReleaseBuilds false
            abortOnError false
        }
    }

Upvotes: 1

Related Questions