I'm cannot make a build after installing both the Google Play Services plugin and the Firebase Messaging plugin. I'm using the latest versions of both. I get the "Unable to convert classes into dex format" error. The two libraries that conflict are play-services-auth-10.2.6 and play-services-base-11.2.0. Google Play Services resolver grabs these two libraries for me. Anyone have a solution?
2 Answers
I've been messing around with the GPGSDependencies.xml and the PluginVersion.cs file from the google play services plugin. I was attempting to make the library versions identical.
I did manage to get identical library versions, this did solve the DEX format issue, but when I made a call for authenticating a google account my app crashed.
This is what I did: In GPGSDependencies.xml I changed the 10+ in these lines to 11.1+
<androidPackage spec="com.google.android.gms:play-services-games:10+">
...
<androidPackage spec="com.google.android.gms:play-services-nearby:10+">
...
<androidPackage spec="com.google.android.gms:play-services-auth:10+">
And I also changed the lines in PluginVersion.cs to
// used to check for the correct min version or play services: 11.2
public const int MinGmsCoreVersionCode = 11200000;
// used to get the right version of dependencies.
public const string PlayServicesVersionConstraint = "11.1+";
from
// used to check for the correct min version or play services: 10.2
public const int MinGmsCoreVersionCode = 10200000;
// used to get the right version of dependencies.
public const string PlayServicesVersionConstraint = "10+";
The PluginVersion.cs alteration was mentioned here: https://github.com/playgameservices/play-games-plugin-for-unity/issues/1892#issuecomment-325555313.
This didn't solve all my problems but maybe it will help you.
Let me know if you managed to solve it, I am still working on a solution.