aws-sdk-android icon indicating copy to clipboard operation
aws-sdk-android copied to clipboard

Cannot resolve dependencies after 2.20.x

Open amadeu01 opened this issue 3 years ago • 4 comments

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

amadeu01 avatar Aug 09 '22 08:08 amadeu01

Found the problem.

there is no version newer to 2.20.0 for com.amazonaws:aws-android-sdk-cognito

amadeu01 avatar Aug 09 '22 09:08 amadeu01

Found here https://repo1.maven.org/maven2/com/amazonaws/aws-android-sdk-cognito/

amadeu01 avatar Aug 09 '22 09:08 amadeu01

The cognito client was removed https://github.com/aws-amplify/aws-sdk-android/pull/2320

amadeu01 avatar Aug 09 '22 09:08 amadeu01

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.

eeatonaws avatar Aug 09 '22 16:08 eeatonaws

Thanks !

amadeu01 avatar Aug 15 '22 21:08 amadeu01