添加AWS后,调试将忽略依赖关系

时间:2017-01-20 01:49:51

标签: android amazon-web-services build.gradle

添加

compile 'com.amazonaws:aws-android-sdk-core:2.2.0'
compile 'com.amazonaws:aws-android-sdk-s3:2.2.0'

到我的build.gradle,我收到错误Warning:WARNING: Dependency commons-logging:commons-logging:1.1.1 is ignored for debug as it may be conflicting with the internal version provided by Android.

根据Android dependency is ignored for releaseDependency commons-logging:commons-logging:1.2 is ignored for debug as it may be conflicting with the internal version provided by Android以及其他一些内容,我添加了

compile 'com.amazonaws:aws-android-sdk-core:2.2.0'  { exclude group: 'commons-logging', module: 'commons-logging' }
compile 'com.amazonaws:aws-android-sdk-s3:2.2.0' { exclude group: 'commons-logging', module: 'commons-logging' }

但现在我收到了错误

Error:(34, 0) Could not find method com.amazonaws:aws-android-sdk-core:2.2.0() for arguments [build_4hd82gce5nfvqpzrlv6x687px$_run_closure2$_closure7@38039d7e] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler. <a href="openFile:C:\[PATH]\build.gradle">Open File</a>

我无法找到任何有关如何处理的建议。

值得注意的是,我仍在设置用户界面;除此之外,我认为我实际上并未添加任何Android Studio自动生成的代码。

1 个答案:

答案 0 :(得分:0)

使用这种方式

compile 'com.amazonaws:aws-android-sdk-s3:2.2.+'