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

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
  • https://stackoverflow.com/a/5427258/10182897 answer already available try to use some google search also – Ashish Apr 17 '19 at 13:38
  • 4
    Possible duplicate of [How to change the minSdkVersion of a project?](https://stackoverflow.com/questions/5427195/how-to-change-the-minsdkversion-of-a-project) – ismail alaoui Apr 17 '19 at 13:48
  • no it's not when i build apk(s) after changing the minSDK version i get the error failed linking references – Josh Ryggs Apr 18 '19 at 09:09

1 Answers1

0

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

<uses-sdk android:minSdkVersion="21"/>
ismail alaoui
  • 5,748
  • 2
  • 21
  • 38