aws-sdk-android
aws-sdk-android copied to clipboard
Cannot resolve dependencies after 2.20.x
State your question
When trying to add dependencies like:
"com.amazonaws:aws-android-sdk-core:$aws_version"
If the aws_version is 2.21.0 or any newer than that, it will not build the app because cannot resolve the dependency.
Even though I could find the dependency on the maven repo (https://repo1.maven.org/maven2/com/amazonaws/aws-android-sdk-core/)
I tried to use the maven repo like
repositories {
mavenLocal()
mavenCentral()
google()
maven {
url = "https://repo1.maven.org/maven2"
}
}
However, even with that maven repo, I couldn't resolve the dependency
The error:
* What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Could not find com.amazonaws:aws-android-sdk-cognito:2.30.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/amazonaws/aws-android-sdk-cognito/2.30.0/aws-android-sdk-cognito-2.30.0.pom
- https://repo.maven.apache.org/maven2/com/amazonaws/aws-android-sdk-cognito/2.30.0/aws-android-sdk-cognito-2.30.0.pom
Required by:
project :app
* Try:
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
Which AWS Services are you utilizing?
localDeps "com.amazonaws:aws-android-sdk-core:$aws_version"
localDeps "com.amazonaws:aws-android-sdk-cognito:$aws_version"
localDeps "com.amazonaws:aws-android-sdk-s3:$aws_version"
localDeps "com.amazonaws:aws-android-sdk-kinesis:$aws_version"
localDeps "com.amazonaws:aws-android-sdk-mobile-client:$aws_version@aar"
Provide code snippets (if applicable)
Environment(please complete the following information):
- SDK Version: Any after 2.20.x, for instance, 2.21.x, 2.22.x ...
- Android tools gradle
classpath 'com.android.tools.build:gradle:7.2.1' - kotlin version 1.7.10
Found the problem.
there is no version newer to 2.20.0 for com.amazonaws:aws-android-sdk-cognito
Found here https://repo1.maven.org/maven2/com/amazonaws/aws-android-sdk-cognito/
The cognito client was removed https://github.com/aws-amplify/aws-sdk-android/pull/2320
The clients in the aws-android-sdk-cognito package were deprecated in version 2.9.0 and, as you pointed out, the package itself was removed in version 2.21.0. For similar functionality to that in the aws-android-sdk-cognito package, please take a look at Amplify DataStore or the AWS AppSync SDK for Android.
Thanks !