Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-16940] Android: Application compiles to fail if it uses both Map and AdMob modules together

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2014-06-07T23:06:01.000+0000
Affected Version/sRelease 3.2.3
Fix Version/sRelease 3.3.0
ComponentsAndroid
Labelsandroid, module_build, qe-testadded
ReporterDavid Asher
AssigneeJon Alter
Created2014-05-05T14:14:52.000+0000
Updated2014-07-22T07:06:53.000+0000

Description

I recently released an app using 3.2.2.GA on both iOS and Android. Installed 3.2.3.GA to work with a different app. Both apps now fail to build for Android, even on 3.2.2.GA, throwing an error during dexer: "java.lang.IllegalArgumentException: already added: Lcom/google/ads/AdRequest$Gender;" The build log is attached. Both apps use the Maps v2 module (and therefore Google Play Services) and also AdMob module, which appears to be the area of conflict. However the first app was successfully built and released under 3.2.2.GA. IOS builds are okay, only Android is failing.

Attachments

FileDateSize
ftb-build.txt2014-05-05T14:14:52.000+000013786

Comments

  1. David Asher 2014-05-05

    More on this: I used time machine to roll-back Titanium Studio prior to the 3.2.3.GA installation, and both apps are now building against 3.2.2.GA with no other changes. So it does appear that the presence of 3.2.3.GA prevents Android from building these apps, possibly due to the combination of Maps v2 and AdMob.
  2. Ritu Agrawal 2014-05-05

    Can you please provide a simple runnable test case to reproduce the issue with the latest release?
  3. David Asher 2014-05-05

    Hi Ritu, I now have a workaround, which is to eliminate the 3.2.3.GA release and build against 3.2.2.GA. Building a 'simple' test case could be a huge project, which I can't do. The two main elements are use of Maps V2 (Google Play Services) and AdMob, so you could try to build a sample app with those. Most likely the issue is that the AdMob module needs to be updated. Regards, David
  4. Ritu Agrawal 2014-05-07

    David - Would it be possible for you to eliminate AdMob module from your project and see if the issue disappears? It would help us narrow down and troubleshoot the issue further.
  5. Ritu Agrawal 2014-05-09

    Moving this issue to engineering as QE can reproduce this issue with another test case as mentioned in above comment.
  6. Karel Kolman 2014-06-06

    I experienced the same issue (unable to build when ti.map & ti.admob used with titanium 3.2.3), Setting the "ti/map" module version to 2.1.3 (instead of 2.1.4 being the default in titanium 3.2.3) i am able to build the app. {noformat} http://ti.appcelerator.org"> 3.2.3.GA .... ti.map ti.admob {noformat}
  7. Jon Alter 2014-06-06

    The problem is that the AdMob module is build using an old version of GoogleAdModAdsSdk (v6.2.1). This library was recently moved into the google play services library. See here: https://developers.google.com/mobile-ads-sdk/download#downloadplay The google play services library was updated in v2.1.4 of the ti.map module so it now includes the google play services library that has these AdMob classes. The solution here is to update the AdMob module to use the latest google play services library. PR: https://github.com/appcelerator/titanium_modules/pull/165
  8. Lokesh Choudhary 2014-06-09

    Verified the fix. When map & admob modules are used together we do not see any errors while running dexer. The app builds successfully. Environment: Appc Studio : 3.3.0.201406061445 Ti SDK : 3.3.0.v20140609115713 Mac OSX : 10.8.5 Alloy : 1.4.0-beta2 CLI - 3.3.0-beta3 Code Processor: 1.1.1 Android Map Module: 2.1.4 AdMob Module: 2.1.1

JSON Source