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:
- Create a blank project by: ionic start AndroidProject blank --cordova
- 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 - 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.