Ionic v4 - push plugin build issues with Android

Using the link I mentioned earlier I experimented with various settings and finally got a successful Android build.

For me it was this that did the trick:

cordova plugin add cordova-android-play-services-gradle-release --variable PLAY_SERVICES_VERSION=16+

The version number at the end was critical for success in my situation. Otherwise my Android build failed if I tried a different value or left out the version parameter completely.

If you run into this issue try adding this plugin, and figure out which version number works for you. All it really seems to be doing is putting that version information into the config.xml file, something like this:

  <plugin name="cordova-android-play-services-gradle-release" spec="^2.1.0">
      <variable name="PLAY_SERVICES_VERSION" value="16+" />
  </plugin>

This may work with other plugins, but I just happened to have a successful build with cordova-plugin-firebase