Google Play Game Services breaks at the latest ionic version

Hi there,

My project stopped working after upgrading my ionic & cordova. I have been pulling up my hair for the last two days and could not find a way out. I’d be grateful if you could help me out.

To replicate the issue:

  1. Create a blank project by: ionic start AndroidProject blank --cordova
  2. Install the google-play-games-services by:
    ionic cordova plugin add cordova-plugin-play-games-services --variable APP_ID=“XXXX”
    npm install @ionic-native/google-play-games-services
  3. ionic cordova build android --release --prod

The above steps throws the following errors:

Task :app:compileReleaseJavaWithJavac FAILED
/home/AndroidProject/platforms/android/app/src/main/java/com/berriart/cordova/plugins/BaseGameActivity.java:21: error: cannot find symbol
import android.support.v4.app.FragmentActivity;
^
symbol: class FragmentActivity
location: package android.support.v4.app
/home/AndroidProject/platforms/android/app/src/main/java/com/berriart/cordova/plugins/BaseGameActivity.java:43: error: cannot find symbol
public abstract class BaseGameActivity extends FragmentActivity implements
^
symbol: class FragmentActivity
/home/AndroidProject/platforms/android/app/src/main/java/com/berriart/cordova/plugins/BaseGameActivity.java:92: error: incompatible types: BaseGameActivity cannot be converted to Activity
mHelper = new GameHelper(this, mRequestedClients);
^
/home/AndroidProject/platforms/android/app/src/main/java/com/berriart/cordova/plugins/BaseGameActivity.java:98: error: method does not override or implement a method from a supertype
@Override
^
/home/AndroidProject/platforms/android/app/src/main/java/com/berriart/cordova/plugins/BaseGameActivity.java:100: error: cannot find symbol
super.onCreate(b);
^
symbol: variable super
location: class BaseGameActivity
/home/AndroidProject/platforms/android/app/src/main/java/com/berriart/cordova/plugins/BaseGameActivity.java:107: error: method does not override or implement a method from a supertype
@Override
^
/home/AndroidProject/platforms/android/app/src/main/java/com/berriart/cordova/plugins/BaseGameActivity.java:109: error: cannot find symbol
super.onStart();
^
symbol: variable super
location: class BaseGameActivity
/home/AndroidProject/platforms/android/app/src/main/java/com/berriart/cordova/plugins/BaseGameActivity.java:110: error: incompatible types: BaseGameActivity cannot be converted to Activity
mHelper.onStart(this);
^
/home/AndroidProject/platforms/android/app/src/main/java/com/berriart/cordova/plugins/BaseGameActivity.java:113: error: method does not override or implement a method from a supertype
@Override
^
/home/AndroidProject/platforms/android/app/src/main/java/com/berriart/cordova/plugins/BaseGameActivity.java:115: error: cannot find symbol
super.onStop();
^
symbol: variable super
location: class BaseGameActivity
/home/AndroidProject/platforms/android/app/src/main/java/com/berriart/cordova/plugins/BaseGameActivity.java:119: error: method does not override or implement a method from a supertype
@Override
^
/home/AndroidProject/platforms/android/app/src/main/java/com/berriart/cordova/plugins/BaseGameActivity.java:121: error: cannot find symbol
super.onActivityResult(request, response, data);
^
symbol: variable super
location: class BaseGameActivity
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
12 errors

FAILURE: Build failed with an exception.

Anybody? I cannot pass this error, I’d be grateful for any pointer you might have

Hi again,

Can someone please give it a try to install the plugin to a blank project and see if the error happens? I am desperate for a solution at this point but not sure whether my system is messed up or not. I’d be grateful if you could give it a go to replicate the error. Please…

Thanks,

Doug

I also encountered with same problem. As I search for the problem there are many suggestions but not worked any of it.

Whats new? Guys did you find any solutions? I tried both ionic and a separate cordova project as a result, they both have the same error.