Error Generating Final Archive Found Duplicate File For Apk
Contents |
here for a quick overview of the site Help
Installation Error: Install_parse_failed_no_certificates
Center Detailed answers to any questions you might have commandinvokationfailure: failed to re-package resources. see the console for details. Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Error generating final archive: Found duplicate file for APK: LICENSE.txt up vote 5 down vote favorite I'm trying to use the jsHybugger library (www.jshybugger.com) to debug some javascript - HOWEVER - when attempting to deploy the dev build to my device I see the following error : Note: I am using Eclipse Also, for the two projects that include the jsHybugger jar, these are the .classpath's :
Sign in Pricing Blog Support Search GitHub This repository Watch 42 Star 187 Fork 91 segmentio/analytics-android Code Issues 4 Pull requests 0 Projects 0 Wiki Pulse Graphs New issue Error generating https://github.com/segmentio/analytics-android/issues/39 final archive with 0.6.12 #39 Closed ivolo opened this Issue May 14, 2014 https://github.com/junit-team/junit4/issues/929 · 9 comments Projects None yet Labels None yet Milestone No milestone Assignees No one assigned 4 participants Segment member ivolo commented May 14, 2014 [2014-05-09 13:01:02 - MGMainActivity] Error generating final archive: Found duplicate file for APK: AndroidManifest.xml Origin 1: /home/rednamer/Work/aliceoid/Aliceoid/bin/resources.ap_ Origin 2: /home/rednamer/Work/aliceoid/Aliceoid/libs/analytics-android-0.6.12.jar Segment member ivolo commented May 14, error generating 2014 Looks like I need to ignore AndroidManifest.xml: android { packagingOptions { exclude 'AndroidManifest.xml' } } cartierjf commented May 14, 2014 That is the solution proposed by gradle. However, I was wondering if excluding AndroidManifest.xml from the package could break anything and, if not, if it's a good practice? Segment member ivolo commented May 16, 2014 It looks like its okay because its a library. I tried error generating final it and it worked for me with 0.6.13. @cartierjf can you confirm that it fixes the issue? Thanks! 0.6.13 jar here: https://github.com/segmentio/analytics-android/raw/0.6.13/releases/analytics-android-0.6.13.jar ivolo closed this May 16, 2014 thiagolocatelli commented May 27, 2014 I am having the same issue here, gonna try removing the AndroidManifest from the jar and see if it works cartierjf commented May 28, 2014 @ivolo excluding AndroidManifest.xml from the package does seem to work without any problem. However I'm still curious about which one is excluded from the package (from the main app, all the libraries, etc.). In any case, this is a workaround and the root of this problem lies somewhere else. According to this link it may be because you are using strings in your library that are also used in my app (common strings such as app_name). Not sure it's relevant but it gives you a starting point for investigation. cartierjf commented May 28, 2014 @ivolo Well, I am getting a java.lang.NoClassDefFoundError: com.mixpanel.android.mpmetrics.MixpanelAPI exception on Analytics.onCreate(this); with this now, but it's probably another issue since I have reverted to 0.6.11 and kept the exclude option and it does not crash. gumballhead commented Jun 5, 2014 @cartrierjf I get the same issue
Sign in Pricing Blog Support Search GitHub This repository Watch 597 Star 5,344 Fork 2,086 junit-team/junit4 Code Issues 137 Pull requests 22 Projects 0 Wiki Pulse Graphs New issue Duplicate file error while using jUnit in Android apps #929 Closed mustafa01ali opened this Issue Jun 10, 2014 · 9 comments Projects None yet Labels lowhanging Milestone 4.12 Assignees No one assigned 6 participants mustafa01ali commented Jun 10, 2014 While using jUnit in Android applications, if any other referenced library has a file named "LICENSE.txt", the APK generation fails with the following error - Error generating final archive: Found duplicate file for APK: LICENSE.txt A simple renaming of LICENSE.txt to LICENSE-junit.txt would make the lives of a ton of Android developers easier :) JUnit member kcooney commented Jun 10, 2014 I thought Android used their own fork of JUnit... Have you tried asking on the Android forums? Many Android projects use JUnit, so I would be surprised if there wasn't a simple workaround. mustafa01ali commented Jun 10, 2014 Most Android developers prefer to write pure junit tests so we go with the standard version of junit. Based on my research, here are workarounds that people generally go with - Remove junit (http://stackoverflow.com/questions/23568882/error-generating-final-archive-found-duplicate-file-for-apk-license-txt) Move the license files under \META-INF (fge/jackson-coreutils@046c100) Rename the file kcooney referenced this issue Jun 20, 2014 Closed junit-4.11.jar contains LICENSE.txt with BSD license for hamcrest #627 csoroiu commented Jun 20, 2014 Android internally comes with junit3 support. I am using junit4 + hamcrest with the help of https://github.com/esmasui/AndroidJUnit4 library which basically facilitates running junit4 tests on Android. For the moment I deleted the License file from junit jar as I see is the one from hamcrest jar (#627) and use a local version of junit (not the one from maven.org). kcooney added the lowhanging label Jun 20, 2014 JUnit member kcooney commented Jun 20, 2014 I don't have any objections to renaming the license file. @dsaff do you have any thoughts? Tibor17 commented Jun 23, 2014 The name of license file is usual in Maven build process. It's really unusual to have junit in runtime app. You can still unzip the junit.jar and remove the license file manually or in ANT/Maven. csoroiu commented Jun 23, 2014 I am using jUnit for unit tests not runtime :). The thing i