Hello,
When I run the command: ionic cordova run android --prod --aot --livereload
The app starts but cordova
object in window is not available. The app works fine but any native plugin does not work and Ionic Native warns, plugin not installed
.
But, if I run the app with livereload flag dropped, the app works great and native functions are available.
I’m using android engine version 7.0.0.
config.xml excerpt
<engine name="android" spec="^7.0.0" />
package.json excerpt
"dependencies": {
"@angular/common": "4.4.6",
"@angular/compiler": "4.4.6",
"@angular/compiler-cli": "4.4.6",
"@angular/core": "4.4.6",
"@angular/forms": "4.4.6",
"@angular/http": "4.4.6",
"@angular/platform-browser": "4.4.6",
"@angular/platform-browser-dynamic": "4.4.6",
"@ionic-native/core": "4.4.2",
"@ionic-native/diagnostic": "4.5.0",
"@ionic-native/file": "4.5.0",
"@ionic-native/file-opener": "4.5.2",
"@ionic-native/file-transfer": "4.5.0",
"@ionic-native/push": "4.5.2",
"@ionic-native/splash-screen": "4.4.2",
"@ionic-native/status-bar": "4.4.2",
"angular2-moment": "1.7.0",
"cordova-android": "^7.0.0",
"cordova-ios": "4.5.3",
"cordova-plugin-compat": "1.2.0",
"cordova-plugin-device": "^1.1.6",
"cordova-plugin-document-viewer": "0.9.6",
"cordova-plugin-file": "^5.0.0",
"cordova-plugin-file-opener2": "^2.0.19",
"cordova-plugin-file-transfer": "^1.7.0",
"cordova-plugin-inappbrowser": "^1.7.1",
"cordova-plugin-ionic-webview": "^1.1.16",
"cordova-plugin-splashscreen": "^4.0.3",
"cordova-plugin-statusbar": "^2.3.0",
"cordova-plugin-whitelist": "^1.3.2",
"cordova-plugin-x-socialsharing": "^5.2.1",
"cordova.plugins.diagnostic": "^3.7.2",
"es6-promise-plugin": "^4.1.0",
"font-awesome": "4.7.0",
"ionic-angular": "3.9.2",
"ionic-gallery-modal": "^0.2.7",
"ionic-plugin-keyboard": "^2.2.1",
"ionicons": "3.0.0",
"moment": "2.19.3",
"phonegap-plugin-push": "^2.1.2",
"rxjs": "5.5.2",
"zone.js": "0.8.18"
},
"devDependencies": {
"@ionic/app-scripts": "^3.1.7",
"typescript": "2.4.2"
}
Node Version: 7.10.0
Please let me know, if there is something, I’m doing wrong or any packages that need upgrading / downgrading.
Also, if you need more information of my working environment.
Thanks,