Vishwanath
Vishwanath

Reputation: 164

Gradle sync fails for com.amazonaws:aws-android-sdk-mobile-client:2.8.5()

I am trying to use login functionality of AWS - Amazon Cognito for my Android App.I am referring to the documentation - https://docs.aws.amazon.com/aws-mobile/latest/developerguide/mobile-hub-add-aws-mobile-user-sign-in.html

I have added 3 sets of dependencies as per the documentation as below code snippet

// Mobile Client for initializing the SDK  
    implementation 'com.amazonaws:aws-android-sdk-mobile-client:2.8.5'  { transitive = true }  
// Cognito UserPools for SignIn  
    implementation 'com.android.support:support-v4:28.0.0'
    implementation 'com.amazonaws:aws-android-sdk-auth-userpools:2.8.5' { transitive = true }  
// Sign in UI Library  
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.amazonaws:aws-android-sdk-auth-ui:2.8.5'  { transitive = true }

But my gradle sync is failing with the below error:

Could not find method com.amazonaws:aws-android-sdk-mobile-client:2.8.5() for arguments [build_6vy0z59k6cznmh7b4jt6hu05j$_run_closure2$_closure6@46f6d617] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

I guess something is wrong with android-sdk-mobile-client dependency but am not sure what is the issue

Upvotes: 0

Views: 1770

Answers (1)

Chunqiang Sun
Chunqiang Sun

Reputation: 51

You should use the following format with parentheses

implementation ('com.amaozonaws:aws-android-sdk-mobile-client:2.8.5')  { transitive = true } 

instead of:

implementation 'com.amazonaws:aws-android-sdk-mobile-client:2.8.5'  { transitive = true } 

Upvotes: 2

Related Questions