Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-17383] Presence of ti.cloudpush module causes Dexer build error

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionInvalid
Resolution Date2014-07-24T22:44:45.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTooling
Labelsn/a
ReporterTim Statler
AssigneeJon Alter
Created2014-07-24T15:49:36.000+0000
Updated2014-10-09T16:15:07.000+0000

Description

Steps to repro: 1. Create a new Mobile App Project in Studio or CLI 2. In Tiapp.xml overview, add the ti.cloudpush module. 3. Build for Android, from Studio or CLI. Result: Following error:
[ERROR] Failed to run dexer:
[ERROR]   
[ERROR] UNEXPECTED TOP-LEVEL EXCEPTION:
[ERROR] java.lang.IllegalArgumentException: already added: Lcom/appcelerator/cloudpush/APSCallbackHandler;
[ERROR]         at com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java:122)
[ERROR]         at com.android.dx.dex.file.DexFile.add(DexFile.java:161)
[ERROR]         at com.android.dx.command.dexer.Main.processClass(Main.java:685)
[ERROR]         at com.android.dx.command.dexer.Main.processFileBytes(Main.java:634)
[ERROR]         at com.android.dx.command.dexer.Main.access$600(Main.java:78)
[ERROR]         at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:572)
[ERROR]         at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:284)
[ERROR]         at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
[ERROR]         at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
[ERROR]         at com.android.dx.command.dexer.Main.processOne(Main.java:596)
[ERROR]         at com.android.dx.command.dexer.Main.processAllFiles(Main.java:498)
[ERROR]         at com.android.dx.command.dexer.Main.runMonoDex(Main.java:264)
[ERROR]         at com.android.dx.command.dexer.Main.run(Main.java:230)
[ERROR]         at com.android.dx.command.dexer.Main.main(Main.java:199)
[ERROR]         at com.android.dx.command.Main.main(Main.java:103)
[ERROR] 1 error; aborting
After removing ti.cloudpush from Tiapp.xml, I can build without error.

Comments

  1. Ingo Muschenetz 2014-07-24

    [~jalter], thoughts?
  2. Jon Alter 2014-07-24

    [~tstatler] If you look in the "lib" folder where your ti.cloudpush module is installed you will likely find two different versions of the "aps-cloudpush-0.8.X.jar". My path looks like:
       /Users/jalter/Library/Application\ Support/Titanium/modules/android/ti.cloudpush/3.3.0/lib
       
    The one you want in there is "aps-cloudpush-0.8.4.jar", so delete the other one. This happens because we decided to not bump the version of the module when we updated it. When the "new" version of the module was installed it overwrote the old version leaving two versions of that jar. Please let me know how it goes.
  3. Tim Statler 2014-07-24

    Thanks [~jalter], deleting the 0.8.2 JAR fixed the problem.

JSON Source