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

GameRequest doesn't exist #10

Open
arthuro555 opened this issue Apr 22, 2020 · 4 comments
Open

GameRequest doesn't exist #10

arthuro555 opened this issue Apr 22, 2020 · 4 comments

Comments

@arthuro555
Copy link

I cannot build my cordova app with this plugin. The error is that this plugin apparently uses an api that doesn't exist (anymore). The error:

Error: /worker/app-2321125f-8454-4860-9587-b826f03fd797/platforms/android/app/src/main/java/com/berriart/cordova/plugins/GameHelper.java:43: error: package com.google.android.gms.games.request does not exist
import com.google.android.gms.games.request.GameRequest;
                                           ^
/worker/app-2321125f-8454-4860-9587-b826f03fd797/platforms/android/app/src/main/java/com/berriart/cordova/plugins/GameHelper.java:174: error: cannot find symbol
    ArrayList<GameRequest> mRequests;
              ^
  symbol:   class GameRequest
  location: class GameHelper
/worker/app-2321125f-8454-4860-9587-b826f03fd797/platforms/android/app/src/main/java/com/berriart/cordova/plugins/GameHelper.java:492: error: cannot find symbol
    public ArrayList<GameRequest> getRequests() {
                     ^
  symbol:   class GameRequest
  location: class GameHelper
/worker/app-2321125f-8454-4860-9587-b826f03fd797/platforms/android/app/src/main/java/com/berriart/cordova/plugins/GameHelper.java:714: error: cannot find symbol
            mRequests = Games.Requests
                             ^
  symbol:   variable Requests
  location: class Games

I cannot find GameRequest on https://developers.google.com/android/reference/com/google/android/gms/games/package-summary too.

@ReDemoNBR
Copy link

Just had the same problem and found that it was deprecated along with Google+ integrations. Can't build either.

Google Play Games Service docs using Wayback Machine: https://web.archive.org/web/20170715182309/https://developers.google.com/android/reference/com/google/android/gms/games/request/package-summary

deprecation notice: https://android-developers.googleblog.com/2016/12/games-authentication-adopting-google.html

@ReDemoNBR
Copy link

Found a way to fix it by forcing the versions of com.google.android.gms:play-services-games to 17.+ and com.google.android.gms:play-services-plus to 16.+ by changing the plugin variables in package.json like below. This way, it still using the old libraries that still had the deprecated features

"cordova": {
  "plugins": {
    "cordova-plugin-play-games-services": {
      "APP_ID": "<app_id>",
      "ANDROID_PLAY_SERVICES_GAMES_VERSION": "17.+",
      "ANDROID_PLAY_SERVICES_PLUS_VERSION": "16.+"
    },
  }
}

@arthuro555
Copy link
Author

arthuro555 commented Jun 22, 2020

Thanks for the workaround, but the plug-in should still be updated nontheless

@princesanjivy
Copy link

It worked! But it should be updated, so we don't get any probs in future when game is published in play.

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

3 participants