I am setting up an Android application using the AWS backend, and compiling the library com.amazonaws:aws-android-sdk-auth-ui:2.6.+@aar
requires 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'
compile ('com.amazonaws:aws-android-sdk-mobile-client:2.6.7@aar') { transitive = true; }
compile ('com.amazonaws:aws-android-sdk-auth-userpools:2.6.+@aar') { transitive = true; }
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 minSdkVersion
19 and build gradle successfully?
source
share