AWS auth ui sdk requires minSdkVersion 23, why?

I am setting up an Android application using the AWS backend, and compiling the library com.amazonaws:aws-android-sdk-auth-ui:2.6.+@aarrequires minSdkVersion to be 23 in the gradle application level file, however I want to use 19 as minSdkVersion. Here is my gradle file.

apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    defaultConfig {
        applicationId "com.jwb.juicewithbenefits"
        minSdkVersion 19
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    implementation 'com.android.support:design:26.1.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.1'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
    // Mobile Client for initializing the SDK
    compile ('com.amazonaws:aws-android-sdk-mobile-client:2.6.7@aar') { transitive = true; }
    // Cognito UserPools for SignIn
    compile ('com.amazonaws:aws-android-sdk-auth-userpools:2.6.+@aar') { transitive = true; }
    // Sign in UI Library
    compile ('com.amazonaws:aws-android-sdk-auth-ui:2.6.+@aar') { transitive = true; }
}

Here is the error.

Error:Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 19 cannot be smaller than version 23 declared in library [com.amazonaws:aws-android-sdk-auth-ui:2.6.13] /Users/tomfinet/.gradle/caches/transforms-1/files-1.1/aws-android-sdk-auth-ui-2.6.13.aar/7dfb53c482a0be1de8d21de2413312fd/AndroidManifest.xml as the library might be using APIs not available in 19
    Suggestion: use a compatible library with a minSdk of at most 19,
        or increase this project minSdk version to at least 23,
        or use tools:overrideLibrary="com.amazonaws.mobile.auth.ui" to force usage (may lead to runtime failures)

When I use 23 as minSdkVersion, the gradle build succeeds, but not with 19. How can I use minSdkVersion19 and build gradle successfully?

+4
source share
1 answer

aws-android-sdk-auth-uiwas introduced in version 2.6.0 Link to link .

The v23 platform dependencies ( aws-android-sdk-auth-ui / pom.xml ) were introduced in this commit :

<dependency>
  <groupId>com.android.support</groupId>
  <artifactId>support-v4</artifactId>
  <version>23.0.0</version>
  <type>aar</type>
</dependency>
<dependency>
  <groupId>com.android.support</groupId>
  <artifactId>appcompat-v7</artifactId>
  <version>23.0.0</version>
  <type>aar</type>
</dependency>
<dependency>
  <groupId>com.android.support</groupId>
  <artifactId>cardview-v7</artifactId>
  <version>23.0.0</version>
  <type>aar</type>
</dependency>

, v23 Android SDK, aws-android-sdk-auth.

+2

Source: https://habr.com/ru/post/1691855/


All Articles