Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-20377] Android: Inclusion of Ti.map causes a compile error for Nexus 5 device running Android 6.01

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionDuplicate
Resolution Date2017-01-23T21:01:50.000+0000
Affected Version/sRelease 5.1.2
Fix Version/sRelease 6.0.0
ComponentsAndroid
Labelsandroid
ReporterRamesh RAMAMURTHY
AssigneeGary Mathews
Created2016-02-10T05:00:25.000+0000
Updated2017-03-23T22:47:19.000+0000

Description

When I compile the app with the Ti.Map module included, tried version 2.4.3 and 2.4.7. I get a compilation error in the module. The submitted app to the playstore will also not work and cause the application to crash. The error has been isolated to this module as removing this module and compiling works well. the build error message is as follows here is the error message that I get [INFO] : Running dexer: /Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/bin/java "-Xmx1024M" "-XX:-UseGCOverheadLimit" "-Djava.ext.dirs=/Users/ramesh/Library/android-sdk-macosx/platform-tools" "-jar" "/Users/ramesh/Library/android-sdk-macosx/build-tools/23.0.1/lib/dx.jar" "--dex" "--output=/Users/ramesh/git/com.hotels.mobile/build/android/bin/classes.dex" "/Users/ramesh/git/com.hotels.mobile/build/android/bin/classes" "/Users/ramesh/Library/Application Support/Titanium/mobilesdk/osx/5.1.2.GA/android/lib/titanium-verify.jar" "/Users/ramesh/Library/Application Support/Titanium/modules/android/facebook/4.0.5/facebook.jar" "/Users/ramesh/Library/Application Support/Titanium/modules/android/facebook/4.0.5/lib/bolts-android-1.1.2.jar" "/Users/ramesh/Library/Application Support/Titanium/modules/android/facebook/4.0.5/lib/facebooksdk.jar" "/Users/ramesh/Library/Application Support/Titanium/modules/android/ti.map/2.3.4/map.jar" "/Users/ramesh/Library/Application Support/Titanium/modules/android/ti.map/2.3.4/lib/google-play-services-base.jar" "/Users/ramesh/Library/Application Support/Titanium/modules/android/ti.map/2.3.4/lib/google-play-services-map.jar" "/Library/Application Support/Titanium/modules/android/analytics.google/3.0.0/googleanalytics.jar" "/Library/Application Support/Titanium/modules/android/analytics.google/3.0.0/lib/google-play-services.jar" "/Users/ramesh/Library/Application Support/Titanium/mobilesdk/osx/5.1.2.GA/android/kroll-v8.jar" "/Users/ramesh/Library/Application Support/Titanium/mobilesdk/osx/5.1.2.GA/android/modules/titanium-analytics.jar" "/Users/ramesh/Library/Application Support/Titanium/mobilesdk/osx/5.1.2.GA/android/aps-analytics.jar" "/Users/ramesh/Library/Application Support/Titanium/mobilesdk/osx/5.1.2.GA/android/modules/titanium-android.jar" "/Users/ramesh/Library/Application Support/Titanium/mobilesdk/osx/5.1.2.GA/android/jaxen-1.1.1.jar" "/Users/ramesh/Library/Application Support/Titanium/mobilesdk/osx/5.1.2.GA/android/ti-commons-codec-1.3.jar" "/Users/ramesh/Library/Application Support/Titanium/mobilesdk/osx/5.1.2.GA/android/kroll-common.jar" "/Users/ramesh/Library/Application Support/Titanium/mobilesdk/osx/5.1.2.GA/android/titanium.jar" "/Users/ramesh/Library/Application Support/Titanium/mobilesdk/osx/5.1.2.GA/android/modules/titanium-app.jar" "/Users/ramesh/Library/Application Support/Titanium/mobilesdk/osx/5.1.2.GA/android/modules/titanium-ui.jar" "/Users/ramesh/Library/Application Support/Titanium/mobilesdk/osx/5.1.2.GA/android/nineoldandroids-appc-2.4.0.jar" "/Users/ramesh/Library/Application Support/Titanium/mobilesdk/osx/5.1.2.GA/android/modules/titanium-filesystem.jar" "/Users/ramesh/Library/Application Support/Titanium/mobilesdk/osx/5.1.2.GA/android/modules/titanium-media.jar" "/Users/ramesh/Library/Application Support/Titanium/mobilesdk/osx/5.1.2.GA/android/modules/titanium-appcompat.jar" "/Users/ramesh/Library/Application Support/Titanium/mobilesdk/osx/5.1.2.GA/android/android-support-v4.jar" "/Users/ramesh/Library/Application Support/Titanium/mobilesdk/osx/5.1.2.GA/android/android-support-v7-appcompat.jar" "/Users/ramesh/Library/Application Support/Titanium/mobilesdk/osx/5.1.2.GA/android/modules/titanium-cardview.jar" "/Users/ramesh/Library/Application Support/Titanium/mobilesdk/osx/5.1.2.GA/android/cardview-v7-23.0.1.jar" "/Users/ramesh/Library/Application Support/Titanium/mobilesdk/osx/5.1.2.GA/android/modules/titanium-locale.jar" "/Users/ramesh/Library/Application Support/Titanium/mobilesdk/osx/5.1.2.GA/android/modules/titanium-network.jar" "/Users/ramesh/Library/Application Support/Titanium/mobilesdk/osx/5.1.2.GA/android/modules/titanium-xml.jar" "/Users/ramesh/Library/Application Support/Titanium/mobilesdk/osx/5.1.2.GA/android/modules/titanium-platform.jar" "/Users/ramesh/Library/Application Support/Titanium/mobilesdk/osx/5.1.2.GA/android/modules/titanium-gesture.jar" "/Users/ramesh/Library/Application Support/Titanium/mobilesdk/osx/5.1.2.GA/android/modules/titanium-geolocation.jar" "/Users/ramesh/Library/Application Support/Titanium/mobilesdk/osx/5.1.2.GA/android/modules/titanium-database.jar" [ERROR] : Failed to run dexer: [ERROR] : [ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/maps/LocationSource; [ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/maps/GoogleMap$4; [ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/maps/StreetViewPanorama$OnStreetViewPanoramaChangeListener; [ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/maps/StreetViewPanoramaFragment; [ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/maps/GoogleMap$InfoWindowAdapter; [ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/maps/MapsInitializer; [ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/maps/MapFragment; [ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/maps/GoogleMap$OnMyLocationButtonClickListener; [ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/maps/UiSettings; [ERROR] : [ERROR] : UNEXPECTED TOP-LEVEL EXCEPTION: [ERROR] : java.lang.RuntimeException: Translation has been interrupted [ERROR] : at com.android.dx.command.dexer.Main.processAllFiles(Main.java:608) [ERROR] : at com.android.dx.command.dexer.Main.runMonoDex(Main.java:311) [ERROR] : at com.android.dx.command.dexer.Main.run(Main.java:277) [ERROR] : at com.android.dx.command.dexer.Main.main(Main.java:245) [ERROR] : at com.android.dx.command.Main.main(Main.java:106) [ERROR] : Caused by: java.lang.InterruptedException: Too many errors [ERROR] : at com.android.dx.command.dexer.Main.processAllFiles(Main.java:600) [ERROR] : ... 4 more 2016-02-06T01:58:49.384Z | TRACE | titanium exited with exit code 1 2016-02-06T01:58:49.389Z | ERROR | Error: ti run exited with error code 1 at ChildProcess. (/Users/ramesh/.appcelerator/install/5.1.0/package/node_modules/appc-cli-titanium/plugins/run.js:92:66) at ChildProcess.emit (events.js:110:17) at Process.ChildProcess._handle.onexit (child_process.js:1074:12) 2016-02-06T01:58:49.392Z | TRACE | Sending exit signal to titanium process: 76982 [ERROR] Application Installer abnormal process termination. Process exit value was 1

Comments

  1. Thiru 2016-02-22

    Appcelerator team, Is there a fix for this issue now? Can you pls give us an ETA? Thanks!
  2. Chee Kiat Ng 2016-02-23

  3. Thiru 2016-02-23

    We tried the earlier version of 2.3.1 and it did not work, either. So, we are stuck now with nothing working.
  4. Ashraf Abu 2016-02-23

    [~tsriniv] What Titanium SDK are you using?
  5. Ramesh RAMAMURTHY 2016-02-23

    Ti sdk version 5.1.2
  6. Thiru 2016-02-23

    We are using Ti sdk version 5.1.2. Can you pls provide a fix soon?
  7. Hieu Pham 2016-02-23

    It looks like one of your other modules also uses google-play-services library. Could you tell us which one?
  8. Thiru 2016-02-23

    Ramesh and I work together. He will respond to your question very soon.
  9. Joseph Sachs 2016-02-24

  10. Thiru 2016-02-24

    Ti SDK 5.1.2.GA with ti.map does not work for us, which is the reason for creating the Jira ticket.
  11. Ramesh RAMAMURTHY 2016-02-25

    5.1.2 and 2.3.1 work, unforturnately I can't go back to 5.1.2 and I need 5.2.0 due to another bug in Appecelerator. I will need this fixed .
  12. Joseph Sachs 2016-02-26

    I can confirm, the issue is with google-play-services, which is being added twice, once by our Fused Android Geolocation custom module (in my case) and then again with ti.map.. it's the reason these errors: [ERROR] : Failed to run dexer: [ERROR] : [ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/maps/LocationSource; [ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/maps/GoogleMap$4; [ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/maps/StreetViewPanorama$OnStreetViewPanoramaChangeListener; [ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/maps/StreetViewPanoramaFragment; [ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/maps/GoogleMap$InfoWindowAdapter; [ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/maps/MapsInitializer; [ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/maps/MapFragment; [ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/maps/GoogleMap$OnMyLocationButtonClickListener; [ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/maps/UiSettings; [ERROR] :
  13. Chee Kiat Ng 2016-02-27

    [~rramesh1] How about using an older version of the ti.map module (2.3.1), but with 5.2.0 Ti SDK?
  14. Chee Kiat Ng 2016-02-27

    [~tsriniv] Can you kindly inform us which other modules you are using other than ti.map?
  15. Ramesh RAMAMURTHY 2016-02-27

    it is still an issue problem with 5.2 and 2.3.1 I use gps location in the app, Facebook, google-analytics,
  16. ardy wongso 2016-03-01

    currently what i did to avoid this issue is removing "google-play-services.jar" on any other module which i included to the project. i wish there will be better way as the conflict only happen since v 2.3.3 and above (or since ti.map including google-play-services-base.jar and google-play-services-map.jar)
  17. Ramesh RAMAMURTHY 2016-03-01

    Please provide me with detail instructions and how to accomplish this task. I will work with it until an official solution is provided.
  18. Ashraf Abu 2016-03-01

    I believe [~dyan02] did it by going to the project folder:- modules>android>ti.map>"version number">lib folder and removing the jars as he mentioned. He also mentioned that he did that for all other modules as well.
  19. Joseph Sachs 2016-03-01

    Has Google Play Services been embedded in Ti 5.2.0.GA for Android?
  20. Ashraf Abu 2016-03-02

    [~underlabs] If my memory serves me correctly, no. The Titanium SDK does not include the Google Play Services jars. The jars are instead in the modules that require them. If there's a conflict in the compile error, it means that you have 2 modules with different Google Play jars. Hence the unofficial work around suggested by [~dyan02] by removing one of them.
  21. Ramesh RAMAMURTHY 2016-03-02

    In a mac where will I find the modules folder?
  22. Ashraf Abu 2016-03-02

    {quote}currently what i did to avoid this issue is removing "google-play-services.jar" on any other module which i included to the project. i wish there will be better way as the conflict only happen since v 2.3.3 and above (or since ti.map including google-play-services-base.jar and google-play-services-map.jar){quote} I believe from what [~dyan02] wrote, he did that for the other modules except for timap. He left timap as it is.
  23. ardy wongso 2016-03-02

    [~rramesh1], [~msamah] Yes, that's what i've done, Step: 1. in Mac i go to /Users/User_name/Library/Application Support/Titanium/modules/android 2. go to each module, for example i go to lib folder in analytic.google module (/Users/User_name/Library/Application Support/Titanium/modules/android/analytics.google/3.0.0/lib) 3. then i remove google-play-services.jar inside lib folder 4. redo second step on other module that contain google-play-services.jar but this way just a tweak, hope there is solution coming in for Ti.Map
  24. Bo Wang 2016-03-02

    Having the same issue. Can anyone confirm that google.analytics still works after removing google.play.services.jar? Thanks, we are struck at this. Could anyone provide a ETA for this ticket too plz?
  25. Ramesh RAMAMURTHY 2016-03-03

    ok I looked in the above said folder and I did not find google-play-services.jar. I searched all the folders in my mac and I did not find this file. is that the right file?
  26. Thiru 2016-03-06

    Hello Appcelerator team, Ramesh and I work as a team. So, is there a response to his last question posted two days ago? We are waiting for the response as to the file. Please make this a priority and respond, as we have been waiting for several days now to get this issue resolve. Thanks!
  27. Chee Kiat Ng 2016-03-06

    The workaround that Ardy proposed should work [~rramesh1], Can you go through each android module folder again? especially those that you are using in your app. (except timap). Also, what you can try to do is to create a new app with the ti.map module, and add and build other modules until it fails so that you can find which is the module that contains the conflicting google-play-services?
  28. Joseph Sachs 2016-03-11

    I have done a very small simple App that uses ti.maps (for Android) and another Module which uses FusedLocation. Both have the libs/google-play-services.jar, the one of ti.map has the trimmed google-play-services split in 2 jar files as indicated in the module. Both modules are part of the project. If I remove the module altogether: geolocationPro (the FusedLocation), the App works. Using this with SDK 5.1.2.GA and 5.2.0.GA, each has it's issues. If anyone is able to make it run (ideally in 5.2.0), then we possibly could have a solution for google-play-services being used for multiple modules within the same App. So with this sample ti.map and other modules with their lib/google-play-services.jar App, 5.2.0.GA is not working. Sample Alloy Project: https://www.dropbox.com/s/jsl9h9ksypa0lta/TiMapIssueAlloy.zip?dl=0
  29. Joseph Sachs 2016-04-06

    UPDATE: Our issue got fixed by one of our developer @Miguel by unifying google-play-services for ti.map, ti.cloudpush and geolocation-pro (our custom module for Android's Fused Location). Note though: ti.map and ti.cloudpush work with version 7571000 of google-play-services.jar
  30. Ashraf Abu 2016-04-07

    [~underlabs] (y)
  31. Ramesh RAMAMURTHY 2016-04-07

    can you please let me know how you guys unified it? I have been waiting for a solution. thanks in advance. cheers
  32. Thiru 2016-04-07

    I work with Ramesh and my question is this same as his. Can you pls describe the steps you followed to get this issued fixed?
  33. Thiru 2016-04-08

    Can Abu or Sachs please describe the steps to overcome the issue of the map?
  34. Joe Falcone 2016-05-15

    The solution being referred to is the same one we use which is to use one of several techniques to create your own google-play-services.jar file which replaces the various google-play-services.jar files (with various names) that are in the different Android modules that we use. In our case, instead of FusedLocation, it is a Push Messaging module that causes problems for us. Making all modules use the same google-play-services.jar file solves the problem. Otherwise there are conflicts in references that can't be resolved because there are two (or more) possible resolutions for at least some of the references to methods in Google Play Services.
  35. Hieu Pham 2016-06-01

    The quickest way to grab the specific libraries is from android-sdks's m2repository, namely: android-sdks/extras/google/m2repository/com/google/android/gms/* If you don't have m2repository, you can download it from the SDK Manager.
  36. Hans Knöchel 2017-01-23

    This issue was fixed in 6.0.0 as part of TIMOB-23697.
  37. Lee Morris 2017-03-23

    Closing ticket as Duplicate with reference to the above comments.

JSON Source