Titanium JIRA Archive
Appcelerator Community (AC)

[AC-1012] Android build with ti.cloudpush fails on SDK 4.1.1

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionCannot Reproduce
Resolution Date2015-10-28T01:15:20.000+0000
Affected Version/sAppcelerator Studio 4.3.1
Fix Version/sn/a
Componentsn/a
Labelsn/a
ReporterConny Brunnkvist
AssigneeRadamantis Torres-Lechuga
Created2015-10-22T13:10:52.000+0000
Updated2016-03-08T07:37:20.000+0000

Description

Steps to Reproduce

Failed to run dexer - impossible to build using 5.0.3 CLI

Actual Result

UNEXPECTED TOP-LEVEL EXCEPTION: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/dynamic/LifecycleDelegate;

Expected Result

A successful Android build with ti.cloudpush module available.

Attachments

FileDateSize
.log2015-10-22T13:11:03.000+0000636581
diagnostic7779652863286003910.log2015-10-22T13:11:33.000+0000162999

Comments

  1. Aminul Islam 2015-10-27

    Hi , I have tested this issue. I can't reproduce it . I tested this using the ti.cloudpush 3.4.0 Environment :
       Appcelerator Command-Line Interface, version 5.0.3
       Operating System
         Name                        = Mac OS X
         Version                     = 10.10.5
         Architecture                = 64bit
         # CPUs                      = 4
         Memory                      = 8589934592
       Node.js
         Node.js Version             = 0.10.37
         npm Version                 = 1.4.28
       Titanium CLI
         CLI Version                 = 5.0.5
       Titanium SDK
         SDK Version                 = 5.0.2.GA
         SDK Path                    = /Users/Raju/Library/Application Support/Titanium/mobilesdk/osx/5.0.2.GA
         Target Platform             = android
       Command
       
    Thanks
  2. Conny Brunnkvist 2015-10-27

    Thank you so much for your feedback. I think I just solved it myself: taking a closer look at the dexer command line parameters, it turned out to, of course, be a case of two Titanium Android-native modules containing the same google-services .jar file which caused it to fail. I see that it is quite a common snafu for devs, and I would hope MOD-1985 at some point gets resolved to provide a general solution to these issues. The conflicting modules in my case were ti.admob and ti.cloudpush, both containing lib/google-play-services.jar. I was able to work around it by making a project-local copy of an older version of the module as modules/android/ti.cloudpush/3.3.8-jarfix1, pinning that version in my tiapp.xml, and finally deleting the jar file in the project local modules/android/ti.admob/2.1.5/lib/.

JSON Source