Skip to content

What if my android build fails after adding the SDK

Alexander Boldyrev edited this page Nov 8, 2022 · 1 revision

One of possible reasons for that is dependency conflict between plugins. SDK provides special properties which you can use to enforce specific versions of dependencies for the SDK:

  • ANDROID_SUPPORT_VER_OVERRIDE - set to specific version e.g. "26.1.+" to use this version of android support libraries within SDK
  • ANDROID_FIREBASE_VER_OVERRIDE - set to specific version e.g. "20.+" to use this version of Google dependencies for push
  • ANDROID_GMS_VER_OVERRIDE - set to specific version e.g. "15.+" to use this version of Google dependencies for geofencing

You can set these properties when adding the plugin:

$ cordova plugin add com-infobip-plugins-mobilemessaging --variable ANDROID_SUPPORT_VER_OVERRIDE="26.1.+" --variable ANDROID_FIREBASE_VER_OVERRIDE="20.+" --variable ANDROID_GMS_VER_OVERRIDE="15.+"

Or you can set properties in config.xml of your application inside the plugin section of the SDK:

<plugin name="com-infobip-plugins-mobilemessaging" spec="https://github.com/infobip/mobile-messaging-cordova-plugin.git">
    <variable name="ANDROID_SUPPORT_VER_OVERRIDE" value="26.1.+" />
    <variable name="ANDROID_FIREBASE_VER_OVERRIDE" value="20.+" />
    <variable name="ANDROID_GMS_VER_OVERRIDE" value="15.+" />
</plugin>

Notice

Make sure to remove and add the plugin if you want to change any of these parameters.

Clone this wiki locally