Sitata / titanium-google-analytics

Google analytics for Appcelerator Titanium
MIT License
92 stars 47 forks source link

App using analytics.google fails to build on Android for 5.0.0.GA #48

Open shodanuk opened 8 years ago

shodanuk commented 8 years ago

Environment:

Mac OSX 10.10.5 Ti CLI 5.0.4 Ti SDK 5.0.0.GA Targetting Android SDK 21 Android build tools 22.0.1

[ERROR] Failed to run dexer:
[ERROR]
[ERROR] Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
[ERROR]
[ERROR] UNEXPECTED TOP-LEVEL EXCEPTION:
[ERROR] java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/maps/LocationSource;
[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:732)
[ERROR]         at com.android.dx.command.dexer.Main.processFileBytes(Main.java:673)
[ERROR]         at com.android.dx.command.dexer.Main.access$300(Main.java:83)
[ERROR]         at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:602)
[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:632)
[ERROR]         at com.android.dx.command.dexer.Main.processAllFiles(Main.java:510)
[ERROR]         at com.android.dx.command.dexer.Main.runMonoDex(Main.java:280)
[ERROR]         at com.android.dx.command.dexer.Main.run(Main.java:246)
[ERROR]         at com.android.dx.command.dexer.Main.main(Main.java:215)
[ERROR]         at com.android.dx.command.Main.main(Main.java:106)
[ERROR] 1 error; aborting

Removing analytics.google module results in a successful build.

asiby commented 7 years ago

Hello Soumya

This is an interesting link. Thanks.

On Wed, Oct 19, 2016 at 5:19 PM, Douglas Alves notifications@github.com wrote:

Hello guys,

I know it is an old issue and most of you probably have already solved it, but I thought I should share with with the ONLY solution I could find. It's Proguard! It is really simple and easy to use (in this case) and the tutorial is here https://medium.com/all-titanium/deal-with-titanium-modules-and-its-missing-support-for-android-multidex-546de5486d13#.y4t50z77p . Hope you enjoy and that it helps you as well.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Sitata/titanium-google-analytics/issues/48#issuecomment-254944064, or mute the thread https://github.com/notifications/unsubscribe-auth/AAbz-rCCvfus8Ze-uP2hnuCZoy84JHewks5q1olsgaJpZM4GCbCs .

caiocost commented 7 years ago

@ericpolkadoc im having the same issue, when i use ti.map and analytics.google together the app crash, no matter what version of both and titanium sdk that i use, it still crashes running an fresh new app for tests, no errors on console...

did you found any solution on this?

lulap commented 7 years ago

what facility is provided for users not keen on being part of analytics to opt-out? without cracking your app

asiby commented 7 years ago

None.

It's up to each app developer to have that in the settings ... then disable the analytics module accordingly. However, one has to ask what someone could be hiding if they are trying to opt out of Google Analytics in a simple mobile app (I am assuming it's a simple app). Most of the time, it is used in order to improve the content delivery flow of the app by knowing how people are using the app.

In our case, we have simply explained what we are really doing with Google Analytics and that it cannot and will not be disabled. If they do not want that, then they should not install our app. None of the data we collect can be used to identify a user. We just want to collect information that will help us know the most used features in the app, the most popular pages, the number of time the app is launched, etc. Most importantly, we never collect the GPS location because that can be used for pin pointing a user by linking them with a physical address.

A. Siby

On Tue, Feb 14, 2017 at 4:11 AM, lulap notifications@github.com wrote:

what facility is provided for users not keen on being part of analytics to opt-out? without cracking your app

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Sitata/titanium-google-analytics/issues/48#issuecomment-279649549, or mute the thread https://github.com/notifications/unsubscribe-auth/AAbz-hfhKOSbtFPcOACiw2wv_Bs99P8Vks5rcW_GgaJpZM4GCbCs .

kerberosargos commented 7 years ago

Hi Guys I solved Google Play Services conflict for using more Titanium modules. I have recorded a screencast for solution. You can find it from https://youtu.be/Coei6zvPIys

May be that is help for somebody...