Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Phonegap build failing due to old jar file #88

Open
replayshot opened this issue Jun 9, 2015 · 3 comments
Open

Phonegap build failing due to old jar file #88

replayshot opened this issue Jun 9, 2015 · 3 comments

Comments

@replayshot
Copy link

Hi,

I use your plugin in my htlm5 android app. I have the following in my config.xml <gap:plugin name="com.adobe.plugins.gaplugin" version="2.4.0" />

When trying to build the project with Phonegap Build, I get the following error:

[dex] input: /project/bin/classes
[dex] input: /project/CordovaLib/bin/classes.jar
[dex] input: /project/com.google.play.services/quotes-google-play-services_lib/bin/classes.jar
[dex] input: /project/libs/libGoogleAnalyticsV2.jar
[dex] input: /project/libs/gcm.jar
[dex] input: /project/libs/android-support-v13.jar
[dex] input: /project/com.google.play.services/quotes-google-play-services_lib/libs/google-play-services.jar
[dex] Pre-Dexing /project/CordovaLib/bin/classes.jar -> classes-354d935c1b3d77a87c374ba24ff06ff0.jar
[dex] Pre-Dexing /project/com.google.play.services/quotes-google-play-services_lib/bin/classes.jar -> classes-717319931cf52b02cee71c7bfbd5e005.jar
[dex] Pre-Dexing /project/libs/libGoogleAnalyticsV2.jar -> libGoogleAnalyticsV2-976db1bc57723635ac6427722f0b8e27.jar
[dex] Pre-Dexing /project/libs/gcm.jar -> gcm-899d2cfca8756492942273d522680c46.jar
[dex] Pre-Dexing /project/libs/android-support-v13.jar -> android-support-v13-52570f906f659c8425e543595739771f.jar
[dex] Pre-Dexing /project/com.google.play.services/quotes-google-play-services_lib/libs/google-play-services.jar -> google-play-services-4461890f4c7e98035ce99438e6542ae8.jar
[dex] Converting compiled files and external libraries into /project/bin/classes.dex...
[dx] Merged dex A (169 defs/210.9KiB) with dex B (207 defs/313.9KiB). Result is 376 defs/635.8KiB. Took 0.4s
[dx] Merged dex A (376 defs/635.8KiB) with dex B (1 defs/0.4KiB). Result is 377 defs/807.9KiB. Took 0.2s
[dx] Merged dex A (377 defs/807.9KiB) with dex B (87 defs/113.2KiB). Result is 464 defs/1250.4KiB. Took 0.1s
[dx] Result compacted from 1851.2KiB to 618.4KiB to save 1232.8KiB
[dx] Merged dex A (464 defs/1250.4KiB) with dex B (4 defs/18.7KiB). Result is 468 defs/618.4KiB. Took 0.3s
[dx] Merged dex A (468 defs/618.4KiB) with dex B (535 defs/572.2KiB). Result is 1003 defs/1457.7KiB. Took 0.2s
[dx]
[dx] UNEXPECTED TOP-LEVEL EXCEPTION:
[dx] com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/analytics/internal/Command$1;
[dx] at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:594)
[dx] at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:552)
[dx] at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:533)
[dx] at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:170)
[dx] at com.android.dx.merge.DexMerger.merge(DexMerger.java:188)
[dx] at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:439)
[dx] at com.android.dx.command.dexer.Main.runMonoDex(Main.java:287)
[dx] at com.android.dx.command.dexer.Main.run(Main.java:230)
[dx] at com.android.dx.command.dexer.Main.main(Main.java:199)
[dx] at com.android.dx.command.Main.main(Main.java:103)
[dx]

BUILD FAILED
/home/ec2-user/android-sdk/tools/ant/build.xml:888: The following error occurred while executing this line:
/home/ec2-user/android-sdk/tools/ant/build.xml:890: The following error occurred while executing this line:
/home/ec2-user/android-sdk/tools/ant/build.xml:902: The following error occurred while executing this line:
/home/ec2-user/android-sdk/tools/ant/build.xml:283: null returned: 2

I tried running earlier version of your plugin with no avail. From some research online, it seems that the GoogleAnatlyicsV2 is no longer supported.

Any help/advice is much appreciated. Thanks

@replayshot replayshot changed the title Phonegap build failing Phonegap build failing due to old jar file Jun 11, 2015
@Matthew-Wise
Copy link

Hi

I am currently experiencing the same issue. However I don't think it is due to GoogleAnatlyicsV2.jar not been supported.

I have two plugins in my app that reference GoogleAnatlyicsV2.jar, if I remove one of these plugins my app builds.

@aphil
Copy link

aphil commented Dec 29, 2015

I have the same problem, anyone found a solution?

@rhengles
Copy link

rhengles commented Dec 8, 2016

I have the same problem, anyone found a solution?

[+1]

In my case the exception is:

com.android.dex.DexException: Multiple dex files define Landroid/support/v4/app/ActionBarDrawerToggle$ActionBarDrawerToggleImpl;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants