【问题标题】:Gradle sync fails for com.amazonaws:aws-android-sdk-mobile-client:2.8.5()com.amazonaws:aws-android-sdk-mobile-client:2.8.5() 的 Gradle 同步失败
【发布时间】:2018-12-18 03:12:29
【问题描述】:

我正在尝试将 AWS 的登录功能 - Amazon Cognito 用于我的 Android 应用程序。我指的是文档 - https://docs.aws.amazon.com/aws-mobile/latest/developerguide/mobile-hub-add-aws-mobile-user-sign-in.html

我根据文档添加了 3 组依赖项,如下代码 sn-p

// 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 }

但我的 gradle 同步失败并出现以下错误:

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.

我猜想 android-sdk-mobile-client 依赖有问题,但不确定是什么问题

【问题讨论】:

    标签: android amazon-web-services


    【解决方案1】:

    您应该使用以下带括号的格式

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

    代替:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-05-18
      • 2016-02-05
      • 2023-04-09
      • 1970-01-01
      • 2017-11-07
      • 2019-06-07
      • 1970-01-01
      • 2019-01-18
      相关资源
      最近更新 更多