The solution that I ended up using is to uninstall and reinstall all the plugins after adding the platform. Since I've had trouble with this issue in past Cordova apps, I'm trying to make the builds as consistent as possible, so I'm not committing the platforms directory and deleting it after I build the apk. I've done this with a script:
ionic platform add android
ionic plugin remove org.apache.cordova.device
ionic plugin remove org.apache.cordova.console
ionic plugin remove com.ionic.keyboard
ionic plugin add org.apache.cordova.device
ionic plugin add org.apache.cordova.console
ionic plugin add com.ionic.keyboard
platforms/android/cordova/build --release
rm -rf platforms
This has consistently worked for me, but since I'd rather not have to worry about keeping this current, I have moved these commands into the: after_platform_add/010_install_plugins.js, with the following additions:
packageJSON.cordovaPlugins = packageJSON.cordovaPlugins || [];
packageJSON.cordovaPlugins.forEach(function(plugin) {
exec('cordova plugin remove ' + plugin, function(error, stdout, stderr) {
sys.puts(stdout);
});
});
packageJSON.cordovaPlugins.forEach(function(plugin) {
exec('cordova plugin add ' + plugin, function(error, stdout, stderr) {
sys.puts(stdout);
});
});
This assumes that something along these lines exists in the package.json in the root JSON object:
"cordovaPlugins": [
"org.apache.cordova.console",
"org.apache.cordova.device",
"com.ionic.keyboard"
]
Which should occur automatically if the after_plugin_add/010_register_plugin.js is working properly.
All that said, I feel like this is kind of hacky and that Ionic should be handling all this properly, so hopefully I can find some time to look into this issue on that side of things and find the root issue of this problem.