0

I'm changing the minSdk version but when I build/generate apk(s) I get this error:

failed linking references.

I have tried Invalidating Caches and restarting

apply plugin: 'com.android.application'

android {
    compileSdkVersion 27
    defaultConfig {
        applicationId "com.clubs"
        minSdkVersion 21
        targetSdkVersion 27
        vectorDrawables.useSupportLibrary = true
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    productFlavors {
    }
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'androidx.appcompat:appcompat:1.1.0-alpha02'
    implementation 'com.google.android.material:material:1.1.0-alpha04'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'com.google.android.gms:play-services-maps:16.1.0'
    implementation 'com.jakewharton:butterknife:8.8.1'
    implementation 'nl.psdcompany:duo-navigation-drawer:3.0.0'
    implementation 'com.github.ApendIr:slider:1.0'
    implementation 'com.azoft.carousellayoutmanager:carousel:1.2.4'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test:runner:1.1.2-alpha01'
    implementation 'com.jakewharton:butterknife:10.1.0'
    annotationProcessor 'com.jakewharton:butterknife-compiler:10.1.0'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.2-alpha01'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
}

I don't know if this is what is resulting to the apps crashing in some phones

3

1 Answer 1

0

Set the min SDK version within your project's AndroidManifest.xml file:

<uses-sdk android:minSdkVersion="21"/>
Sign up to request clarification or add additional context in comments.

2 Comments

you should know that this doesn't work in the new android studio
which version ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.