Skip to content
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

GooglePlay Games GMS 123.0.0 Breaks compatibility with existing code and current samples (ie. GamesClass does not contain XYZ and more) #732

Open
1 task done
Eversor opened this issue Dec 22, 2022 · 2 comments

Comments

@Eversor
Copy link

Eversor commented Dec 22, 2022

Xamarin.Android Version (eg: 6.0):

Microsoft Visual Studio Community 2022
Version 17.4.1
VisualStudio.17.Release/17.4.1+33110.190
Xamarin.Android SDK 13.1.0.1 (d17-4/13ba222)
Xamarin.Android Reference Assemblies and MSBuild support.
Mono: a96bde9
Java.Interop: xamarin/java.interop/d17-4@fcc33ce2
SQLite: xamarin/sqlite@23e1ae7
Xamarin.Android Tools: xamarin/xamarin-android-tools/main@0be567a

Operating System & Version (eg: Mac OSX 10.11):

Window 10

Google Play Services Version

Nuget version,

  • GPS-FB with AndroidX dependencies (versions 123.0.0)

Describe your Issue

Updating to latest Android Games 123.0.0 heavily breaks compatibility with existing code. Including the relative samples in this component.

Relevant information

Add relevant project settings from *.csproj file:

Packages used:

    <PackageReference Include="Xamarin.AndroidX.Lifecycle.LiveData" Version="2.5.1.1" />
    <PackageReference Include="Xamarin.AndroidX.Legacy.Support.V4" Version="1.0.0.15" />
    <PackageReference Include="Xamarin.GooglePlayServices.Games">
      <Version>123.0.0</Version>
    </PackageReference>
    <PackageReference Include="Xamarin.GooglePlayServices.Plus">
      <Version>117.0.0.8</Version>
    </PackageReference>
    <PackageReference Include="Xamarin.AndroidX.Migration">
      <Version>1.0.10</Version>
    </PackageReference>
    <PackageReference Include="Xamarin.Build.Download">
      <Version>0.11.4</Version>
    </PackageReference>

Build settings (tools)

<PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
    <ProjectGuid>{C9356F99-4E2C-48E2-A6EE-106DDD420452}</ProjectGuid>
    <OutputType>Library</OutputType>
    <RootNamespace>BeGenerous</RootNamespace>
    <MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix>
    <MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>
    <AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
    <AndroidResgenClass>Resource</AndroidResgenClass>
    <AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile>
    <AndroidApplication>True</AndroidApplication>
    <AssemblyName>BeGenerous</AssemblyName>
    <TargetFrameworkVersion>v13.0</TargetFrameworkVersion>
    <AndroidSupportedAbis>armeabi-v7a;x86;arm64-v8a;x86_64</AndroidSupportedAbis>
    <NuGetPackageImportStamp>
    </NuGetPackageImportStamp>
    <AndroidEnableMultiDex>true</AndroidEnableMultiDex>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\Debug</OutputPath>
    <DefineConstants>DEBUG;</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <AndroidLinkMode>None</AndroidLinkMode>
    <ConsolePause>false</ConsolePause>
    <AndroidDexTool>d8</AndroidDexTool>
    <AndroidLinkTool>r8</AndroidLinkTool>
    <AndroidUseAapt2>true</AndroidUseAapt2>
    <EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk>
    <AotAssemblies>false</AotAssemblies>
    <EnableLLVM>false</EnableLLVM>
    <AndroidEnableProfiledAot>false</AndroidEnableProfiledAot>
    <BundleAssemblies>false</BundleAssemblies>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>full</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>bin\Release</OutputPath>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>
    <ConsolePause>false</ConsolePause>
    <AndroidDexTool>d8</AndroidDexTool>
    <AndroidLinkTool>r8</AndroidLinkTool>
    <AndroidUseAapt2>true</AndroidUseAapt2>
  </PropertyGroup>

or even better - links to the existing code:
https://github.com/xamarin/GooglePlayServicesComponents/tree/main/samples/com.google.android.gms/play-services-games

Minimal Repro Code Sample

I just downloaded the samples/com.android.gms folder, opened the sln with vs2022 ce and updated nuget to latest packages.

Steps to Reproduce (with link to sample solution if possible):

Same as above.

Include any relevant Exception Stack traces, build logs, adb logs:

1>------ Build started: Project: BeGenerous, Configuration: Debug Any CPU ------
1>C:\Users\Matteo\Desktop\TEST\BeGenerous\Properties\AndroidManifest.xml : warning XA4216: AndroidManifest.xml //uses-sdk/@android:minSdkVersion '16' is less than API-19, this configuration is not supported.
1>C:\Users\Matteo\Desktop\TEST\BeGenerous\Properties\AndroidManifest.xml : warning XA4211: AndroidManifest.xml //uses-sdk/@android:targetSdkVersion '29' is less than $(TargetFrameworkVersion) ''. Using API-33 for ACW compilation.
1>C:\Users\Matteo\Desktop\TEST\BeGenerous\MainActivity.cs(20,43,20,82): warning CS0618: 'GoogleApiClient' is obsolete: 'This class is obsoleted in this android platform'
1>C:\Users\Matteo\Desktop\TEST\BeGenerous\MainActivity.cs(20,43,20,103): warning CS0618: 'GoogleApiClient.IConnectionCallbacks' is obsolete: 'This class is obsoleted in this android platform'
1>C:\Users\Matteo\Desktop\TEST\BeGenerous\MainActivity.cs(20,105,20,144): warning CS0618: 'GoogleApiClient' is obsolete: 'This class is obsoleted in this android platform'
1>C:\Users\Matteo\Desktop\TEST\BeGenerous\MainActivity.cs(20,105,20,172): warning CS0618: 'GoogleApiClient.IOnConnectionFailedListener' is obsolete: 'This class is obsoleted in this android platform'
1>C:\Users\Matteo\Desktop\TEST\BeGenerous\MainActivity.cs(152,30,152,47): error CS0246: The type or namespace name 'GameRequestBuffer' could not be found (are you missing a using directive or an assembly reference?)
1>C:\Users\Matteo\Desktop\TEST\BeGenerous\MainActivity.cs(169,36,169,63): error CS0246: The type or namespace name 'IRequestsLoadRequestsResult' could not be found (are you missing a using directive or an assembly reference?)
1>C:\Users\Matteo\Desktop\TEST\BeGenerous\MainActivity.cs(191,40,191,52): error CS0246: The type or namespace name 'IGameRequest' could not be found (are you missing a using directive or an assembly reference?)
1>C:\Users\Matteo\Desktop\TEST\BeGenerous\MainActivity.cs(265,59,265,98): warning CS0618: 'GoogleApiClient' is obsolete: 'This class is obsoleted in this android platform'
1>C:\Users\Matteo\Desktop\TEST\BeGenerous\MainActivity.cs(328,41,328,53): error CS0246: The type or namespace name 'IGameRequest' could not be found (are you missing a using directive or an assembly reference?)
1>C:\Users\Matteo\Desktop\TEST\BeGenerous\MainActivity.cs(351,41,351,53): error CS0246: The type or namespace name 'IGameRequest' could not be found (are you missing a using directive or an assembly reference?)
1>C:\Users\Matteo\Desktop\TEST\BeGenerous\MainActivity.cs(416,43,416,55): error CS0246: The type or namespace name 'IGameRequest' could not be found (are you missing a using directive or an assembly reference?)
1>C:\Users\Matteo\Desktop\TEST\BeGenerous\MainActivity.cs(38,9,38,48): warning CS0618: 'GoogleApiClient' is obsolete: 'This class is obsoleted in this android platform'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Elapsed 00:00,552 ==========

Screenshot 2022-12-22 154127

@Eversor Eversor changed the title GooglePlay 123.0.0 Breaks compatibility with existing code and current samples (ie. GamesClass does not contain XYZ and more) GooglePlay Games GMS 123.0.0 Breaks compatibility with existing code and current samples (ie. GamesClass does not contain XYZ and more) Dec 22, 2022
@jpobst
Copy link
Contributor

jpobst commented Dec 22, 2022

It looks like GameRequest was deprecated in June 2017: https://developers.google.com/android/guides/releases#june_2017_-_version_110.

And it was removed in version 119.0.0 (https://support.google.com/googleplay/android-developer/answer/9469745).

The samples in this repository are no longer maintained and should probably be removed as they likely no longer compile.

@Eversor
Copy link
Author

Eversor commented Dec 23, 2022

Too bad :( sorry for bringing them out, but i must admit they were the first place i went when i tried to understand why my code was working with the previous version of the Nuget and had tens of errors in the new version. By navigating through Google documentation for the last version of GMS/GPG it seems like a ton of stuff got changed on their end, so i probably need to re-write the whole GPG interface...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants