caffeinalab / ti.goosh

GCM/FCM module for Titanium.
MIT License
52 stars 34 forks source link

Google play service conflict #88

Closed gioggio79 closed 6 years ago

gioggio79 commented 6 years ago

Hello, thanks for your great work.

However I have an incompatibility issue on new release of this module with the Appcelerator modules: ti.maps ti.ads ti.ga

This 3 modules work perfectly all together, but if I try to add your module, the panic start.

here is a link with a sample project: https://www.dropbox.com/s/9wjdafxclksv7r3/Play_Service.zip?dl=0

If you try to remove your module, the project start without problems.

Have you any ideas how can I resolve this conflict? many thanks for your help!

Giorgio

progress44 commented 6 years ago

Hi @gioggio79, are you using the latest Titanium SDK and are the modules you mentioned updated to the latest version?

gioggio79 commented 6 years ago

Hi progress44, yes all modules are update @ last version and I use Ti SDK 6.3.0 GA

progress44 commented 6 years ago

@gioggio79 what's the error you get after you build the app?

gioggio79 commented 6 years ago

If I export the project with your jar this is the error: [ERROR] : Failed to run dexer: [ERROR] : [ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/auth/api/signin/GoogleSignInAccount; [ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/auth/api/signin/GoogleSignInOptions; [ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/auth/api/signin/GoogleSignInOptions$Builder; [ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/auth/api/signin/GoogleSignInOptionsExtension; [ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/auth/api/signin/internal/zzn; [ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/auth/api/signin/zza; [ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/auth/api/signin/zzb; [ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/common/ErrorDialogFragment; [ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/common/GoogleApiAvailability;

I tried to update the jar on other modules and clean duplicate methods (here the examples https://www.dropbox.com/s/0curb6q32m4yhqb/Play_Service_MOD.zip?dl=0 ) but the application crash on maps with this error: https://gist.github.com/gioggio79/2ef8fbb88b102a867f68eb6089349932

progress44 commented 6 years ago

Did you read this guide?

gioggio79 commented 6 years ago

Yes, i read this guide (very helpfull).

But the major problem (I think) is the G.P.S. used by ti.goosh (v. 8487000) and the new modules power by Appcelerator that use v. 10298000. If I try to update the ti.goosh with gps v10.2 it dosn't work and if I try to downgrade ti.map with gps v8 the app crash.

progress44 commented 6 years ago

Try the new version, 3.0.3. I updated the gps version.

gioggio79 commented 6 years ago

Hello progress44, finally I did it! Change only the gps version number doesn't work. So my step are those:

The major problem is that your module use the new jar 11.x but appcelerator have the old jar 10.x. This version difference generate all the problems.

Anyway thanks for your support and I hope this solution can help other people with this modules :)

amigoni commented 6 years ago

I'm confused. I don't see a 10.6 gps specific file I don't even have a gps folder under extras/google/m2repository is it under the general? Also I only see aar. Thanks for your help

gioggio79 commented 6 years ago

Hello @amigoni here an example for create a google-play-service-base.jar: 1) first important step is update the Google repository under Extra on Android SDK 2) go to [androidsdkfolder]\extras\google\m2repository\com\google\android\gms 3) enter in play-services-base folder 4) select the 10.2.6 version (my fault in previous comment sorry) 5) use 7z to open the arr 6) extract only the classes.jar 7) rename as google-play-service-base.jar 8) overwrite the original jar in all modules.

Repeat from 3 to 8 with all jar package you need p.s. i'm under windows, idk if android sdk for mac have a different folder structure :(