1

I am working with the Gimbal SDK in android and I am getting this error in the Gradle Build Messages:

Error:duplicate files during packaging of APK D:\Kowshik\AndroidStudioProjects\SMSBlocker\app\build\outputs\apk\app-debug-unaligned.apk
Path in archive: META-INF/notice.txt
Origin 1: D:\Kowshik\AndroidStudioProjects\SMSBlocker\app\libs\spring-android-core-1.0.1.RELEASE.jar
Origin 2: D:\Kowshik\AndroidStudioProjects\SMSBlocker\app\libs\spring-android-rest-template-1.0.1.RELEASE.jar
You can ignore those files in your build.gradle:
android {
  packagingOptions {
    exclude 'META-INF/notice.txt'
  }
}
Error:Execution failed for task ':app:packageDebug'.
> Duplicate files copied in APK META-INF/notice.txt
File 1: D:\Kowshik\AndroidStudioProjects\SMSBlocker\app\libs\spring-android-core-1.0.1.RELEASE.jar
File 2: D:\Kowshik\AndroidStudioProjects\SMSBlocker\app\libs\spring-android-core-1.0.1.RELEASE.jar
Information:BUILD FAILED
Information:Total time: 5.75 secs
Information:2 errors
Information:0 warnings
Information:See complete output in console

From with I can deduce, I can see that there is a duplicate of the spring-android-core-1.0.1.RELEASE.jar , right? But in my file structure, it is fine and their are no duplicates. Is there any solution to this?

rakeshdas
  • 2,363
  • 5
  • 20
  • 28

2 Answers2

0

I just had this problem today. You need to follow the instructions found here as provided by the user Rodrigo Esquivel in order to get the Gimbal SDK working with Android Studio.

However, I created an article on setting up the Gimbal SDK with Android Studio and it also discusses some interesting facts on geolocation devices. You can find the article here.

Daniel Eagle
  • 2,205
  • 2
  • 18
  • 17
  • Also, if anyone is interested, I created another article on the Gimbal SDK for Proximity at [link](http://danieleagle.com/blog/2014/11/gimbal-sdk-proximity-beacons-deep-dive/). This is a deep drive into the Gimbal SDK for Proximity. – Daniel Eagle Nov 06 '14 at 15:48
0

This is fairly simple. Open the build.gradle file for the app in Studio and add the following section. These files are duplicates in the dependent libraries you have added. Simply exclude them from the build. Add the following code into the android {} element of the build.gradle file.

packagingOptions {
    exclude 'META-INF/notice.txt'
    exclude 'META-INF/license.txt'
}
Krishna Vedula
  • 1,643
  • 1
  • 27
  • 31