多个dex文件定义Lcom / amazonaws / AmazonClientException

时间:2017-07-06 01:28:39

标签: android amazon-web-services

尝试在Android Studio中签署我的AKP时,我一直收到错误:

Error:Error converting bytecode to dex:
Cause: com.android.dex.DexException: Multiple dex files define Lcom/amazonaws/AmazonClientException;

我试图清理我的项目和其他各种解决方案。我害怕进入深层目录并弄乱一些东西,所以我希望有人可以帮助我!

我的依赖项:

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.amazonaws:aws-android-sdk-s3:2.4.4'

//compile project(path: ':backend', configuration: 'android-endpoints')
compile 'com.github.chrisbanes:PhotoView:1.2.6'
compile 'com.davemorrissey.labs:subsampling-scale-image-view:3.5.0'
compile 'com.github.amlcurran.showcaseview:library:5.4.3'
compile 'com.github.d-max:spots-dialog:0.7@aar'
compile 'com.victor:lib:1.0.4'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'me.grantland:autofittextview:0.2.0'//Removed the 0.2.+
compile 'com.wang.avi:library:1.0.5'
compile 'com.braintreepayments.api:drop-in:2.3.8'
compile 'com.android.support:design:24.2.1'


compile 'com.braintreepayments.api:braintree:2.3.9'
compile 'com.loopj.android:android-async-http:1.4.9'
compile 'com.getbase:floatingactionbutton:1.10.1'
compile 'com.mxn.soul:flowingdrawer-core:1.2.2'
compile 'com.github.rengwuxian:MaterialEditText:2.1.4'

compile 'com.github.PhilJay:MPAndroidChart:v3.0.1'



compile files('libs/sinch-android-rtc-3.9.14.jar')
compile 'com.amazonaws:aws-android-sdk-s3:2.4.4'  // you already have this
compile 'com.amazonaws:aws-android-sdk-cognito:2.4.4'





compile 'in.srain.cube:ultra-ptr:1.0.11'
}

1 个答案:

答案 0 :(得分:0)

从文件夹中删除这些jar文件,而不仅仅是从Gradle

compile files('libs/aws-android-sdk-s3-2.2.14.jar')
compile files('libs/aws-android-sdk-core-2.2.14.jar')
compile files('libs/aws-android-sdk-cognito-2.2.14.jar')

使用这些依赖项from Maven Central代替

compile 'com.amazonaws:aws-android-sdk-s3:2.4.4'  // you already have this 
compile 'com.amazonaws:aws-android-sdk-cognito:2.4.4'

不需要Core,因为它是传递依赖