0

I was trying to use Azure mobile Services for my backend of an Android application. So I followed their tutorials and ended up in including these three dependencies:

compile (group: 'com.microsoft.azure', name: 'azure-notifications-handler', version: '1.0.1', ext: 'jar')
compile 'com.microsoft.azure:azure-mobile-services-android-sdk:2.0.3'
compile 'com.microsoft.azure.android:azure-storage-android:0.6.0@aar'

When I want to start the application I get the following error:

Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'.
> com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/MSFTSIG.RSA
    File1: C:\Users\Tassilo\.gradle\caches\modules-2\files-2.1\com.microsoft.azure\azure-mobile-services-android-sdk\2.0.3\5de03bab93697321e5654831bb98df11ad4c19ac\azure-mobile-services-android-sdk-2.0.3.jar
    File2: D:\FH\Master\Master Thesis\PRO\trunk\Implementation\SourceCode\IrisRecognition\app\build\intermediates\exploded-aar\com.microsoft.azure.android\azure-storage-android\0.6.0\jars\classes.jar

What am I doing wrong?

Michael Curd
  • 617
  • 4
  • 10
4ndro1d
  • 2,926
  • 7
  • 35
  • 65

1 Answers1

1

I got this issue while I have added Azure Mobile service. Now it get resolved.

Adding below line resolved the issue:

packagingOptions { 
     exclude "META-INF/MSFTSIG.SF" 
     exclude "META-INF/MSFTSIG.RSA" 
}

Let me know if you have any issue.

Shreyash Mahajan
  • 23,386
  • 35
  • 116
  • 188