Here\'s my Ionic Info
cli packages: (/Users/billb/dev/customer-mkt-app/node_modules)
@ionic/cli-utils : 1.15.2
ionic (I
If you are using Cordova build.gradle is automatically generated and when you next build the project the change in accepted answer above get overwritten back to the old that doesn't work.
So edit platforms/android/cordova/lib/builder/GradleBuiler.js Comment out lines 136-139 and add the next line
/*depsList += ' debugCompile(project(path: "' + libName + '", configuration: "debug"))';
insertExclude(p);
depsList += ' releaseCompile(project(path: "' + libName + '", configuration: "release"))';
insertExclude(p);
*/
depsList += " compile project(':CordovaLib')";
insertExclude(p);