New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conflict with play-games-plugin-for-unity #51
Comments
|
Hello, I had the same problem yesterday ! I solved by open the jar with 7zip and delete 2 files under From memory, it was : They were in conflict because they already exist in google analytics jar. Aymeric |
|
Thanks aymericgeffroy, I used 7zip myself to browse the jar files and find the conflicting jar files. I didn't consider just deleting the classes from one version because they have different CRCs and significantly different file sizes (they clearly have different contents). Command.class is 2063 bytes in libGoogleAnalyticsServices.jar and only 1483 bytes in google-play-services.jar, and Command$1.class is 1276 vs 1162 bytes. This would seem to indicate that there is more code in the GA version. Perhaps the GPGS version is just a compatible subset of what is in the GA jar file, and we can get away with just removing the GPGS version as a work around. Without the source this is a big assumption to make though. For all we know they could be entirely different implementations. Perhaps the we could get some feedback on this from the project's maintainers. Regardless of any available work around, this is still a problem that needs to be addressed by the developers. |
|
Indeed, you are right, there is really a problem ! |
|
Matt, after deleting Comand.class in 'libGoogleAnalyticsServices.jar', i cheked and Google Analytics doesn't work anymore. |
|
I've deleted this classes from google-play-services.jar instead |
|
I have the same issue with Google Play Game Services plugin and Google Analytics plugin. Removing either one of the libraries is not an option. It is very unfortunate that these two plugins are dependant on different versions of other codes. |
|
I was using Google Play Game Services plugin with Google Play service rev.23 in the Android SDK. And it was working fine with the Google Analytics plugin. After I tried to upgrade to rev.24 today, this happens to me, too. I guess you can workaround this issue by downgrading Google Play service to rev.23 for now. I tired to update the Google Play service since I got this issue: |
|
I have same issue. |
|
Apologies. This appears to be a conflict between the v3 analytics SDK(which the plugin relies on) and r24 of GPS. We'll work on creating a version of the Unity plugin that uses v4 so we can drop the v3 lib. In the meantime if you can use r23 or earlier to work around it thats probably the best option. I wouldn't recommend deleting the classes from the GPS jar, but if it works for you. |
|
Could we get a rough estimate (eg. days, weeks or months) of how long it might take until a version of the plugin using v4 of the SDK is released? That will make it easier for us all to make decisions about whether it's worth rolling back to r23 of Google Play or waiting for Analytics to be updated. Especially for anyone who finds this issue between now until nearer to when you release a v4 version of the plug-in. |
|
Sorry, can't give out a timeline. Which methods are you using? |
|
I’m using the following functions: Which parts of the API are dependent on the gms Command.class? If we avoid a function or two in the API, can we get away with using a jar file with the conflicting class removed? |
|
For temporary fix, using r23 of Google Play Services fixed it for me. Like baldwin said. |
|
I think I was also able to fix this by upgrading to Google Analytics v4. I think the core issue is that Google is moving towards putting all their stuff in a single JAR file (the google-play-services.jar). Whereas v3 requires the separate libGoogleAnalyticsServices.jar, v4 just uses the analytics library embedded in google-play-services.jar. May not be an option for this plugin, but also a potential fix. |
|
I was stuck for a long time on this one, trying to integrate both Analytics & Ad mob plugins. v23 solved it! Thanks a lot |
|
Thank you for that, using r23 of Google Play Services fixed the problem straight away |
|
Baldwin's last commit: ab62677 is a first-pass at v4 support if anyone wants to give it a try as it relates to the Play Services interaction. |
|
Guysss m facing same issue And m getting same problem Please help me, I am just trying to add Google Analytics and n struggling for so many days |
|
Somehow the google analytics v4 doesn't work for me, but downgrading to r23 works fine. Thanks :) |
|
Yes even I did same ): |
|
Using r23 worked for me too. Thanks @mauriciotollin for the link |
|
using r23 doesn't help in my case =( |
|
Hi AGulev, You have two solutions :
Note that if you have removed classes from libGoogleAnalyticsServices.jar you should download the original. I'm about to try this two techniques. Tell me if I'm wrong, other idea is to use google analytics V4 but the plugin has to be updated. Good luck and good games |
|
Ok it works using mauriciotollin and keep original libGoogleAnalyticsServices.jar from this plugin. |
|
Using r23 worked for me too. Thanks :] |
|
r23 worked for me as well. |
|
How is this still not fixed? @ Android team |
|
@matt-spungegames can send you me the .jar file after deleting the Command.class and Command$1.class |
|
Pretty much bothering me as well, a fix would be nice. |
|
so sad, a not-so-complicated error taking too much time to fix, facing this problem as well, please give me back 10hours of my life :( |
|
It's a shame this isn't fixed. GPS is v27 at moment, and downgrading to v23 is bad. Also, v4 is not working on Unity 4.X, what is funny because 90% of mobile developers still use Unity 4.X because performance problems in Unity 5. |
|
@studentvz20 Can you give me the full version of Unity 4.x you are using where it doesn't work and what the problem is you are seeing. |
|
@baldwin628 I'm using Unity 4.6.7.f1. Problem with AnalyticsV4 is that GAv4 prefab file is not usable, I would say that prefab is created in Unity 5 (Unity files created in Unity 5 are not recognized in Unity 4). I tryed this yesterday but then I got some other errors what lead me to thinking about compatibility problems - but I was wrong, my project was broken. |
|
can you post a working solution? if I add a lib from r23, then the admob plugin still does not read the GPS plugin. Do I need to replace the lib to r23 after adding full unity package? |
|
Ok I have the Sollution.
|
|
FYI, @baldwin628 pointed me to https://github.com/googleanalytics/google-analytics-plugin-for-unity/blob/master/GoogleAnalyticsV4.unitypackage which should fix the conflict issue. It doesn't show up in releases yet, because there is still work to do to setup the documentation. But I'm sure more testing would be appreciated. |
|
Any news? When it's crazy issue will be fixed? |
|
My configuration is: Installation sequence was: google-analytics then play-games FIX: after that |
|
Thank you Mikleru, your solution is the best. |
|
Guys where you got v4? |
|
Hi, Yukov or direct link |
|
Hey Mikleru, they changed the plugin and the class BackgroundResolution.cs doesn't exist anymore. GPGSDependencies.cs contains similiar code (adding the dependencies), and it manages what .aar files are added. I changed it to include the analytics .aar, and that works. But Google Analytics crashes the app a few seconds after starting it (I assume when it starts actually sending data). I receive no unity errors using logcat -s Unity during this, it just crashes. I've been stuck on this for awhile now, any ideas on what to do? Both plugins work fine if I compile them without the other, but together, and the google-play-services_lib conflicts with the .aar files. Removing the entire google-play-services_lib probably causes the crash.. |
|
This is great, one year later and google play services and analytics still have compatibility issues... |
The google analytics plugin appears to conflict with the google play games plugin.
With both plugins installed in a project, these two jar files:
both contain the class file
com/google/android/gms/analytics/internal/Command.When attempting to build for Android, the following error is produced:
The google-play-services.jar is just the official package sourced directly from the android SDK, while libGoogleAnalyticsServices.jar comes pre-compiled in this git repos, so I figure that this is a problem to be dealt with by this project, rather than by play games services.
The text was updated successfully, but these errors were encountered: