I'm traying integrate Marketing Cloud Push Notifications using MCCordovaPlugin with Ionic 3, in iOS works fine, but when I compile for Android, console sends Error:

Package R does not exist

Cordova version: 7.1.0 Ionic CLI version: 3.19.0

The app is a clean installation and only implements MCCordovaPlugin.


Not sure you have gotten anywhere with this yet, but Gradle build tool is required as a dependency for developing Cordova on Android platform. Do you have this tool installed?


  • Yes I have Gradle installed Gradle 4.4 ------------------------------------------------------------ Build time: 2017-12-06 09:05:06 UTC Revision: cf7821a6f79f8e2a598df21780e3ff7ce8db2b82 Groovy: 2.4.12 Ant: Apache Ant(TM) version 1.9.9 compiled on February 2 2017 JVM: 1.8.0_144 (Oracle Corporation 25.144-b01) OS: Mac OS X 10.13.2 x86_64 Jan 3 '18 at 17:19
  • Also, make sure you don't skip the part about adding your path to environment variables. export PATH=$PATH:/opt/gradle/gradle-4.4.1/bin
    – Tom Brooks
    Jan 5 '18 at 16:08

A simple fix is to go to the file and add it manually or create a bash script to automate it if you use build server.

Just type following:

import {your.app.packagename}.R;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.