When I run “ionic cordova build android” it all works fine.
Altough when I am running “ionic cordova build android --prod --release” I get this error:
Error: Type ArticlePage in /Users/mtnptrsn/Webdev/24kalmar_app/src/pages/article/article.ts is part of the declarations of 2 modules: AppModule in /Users/mtnptrsn/Webdev/24kalmar_app/src/app/app.module.ts and ArticlePageModule in /Users/mtnptrsn/Webdev/24kalmar_app/src/pages/article/article.module.ts! Please consider moving ArticlePage in /Users/mtnptrsn/Webdev/24kalmar_app/src/pages/article/article.ts to a higher module that imports AppModule in /Users/mtnptrsn/Webdev/24kalmar_app/src/app/app.module.ts and ArticlePageModule in /Users/mtnptrsn/Webdev/24kalmar_app/src/pages/article/article.module.ts. You can also create a new NgModule that exports and includes ArticlePage in /Users/mtnptrsn/Webdev/24kalmar_app/src/pages/article/article.ts then import that NgModule in AppModule in /Users/mtnptrsn/Webdev/24kalmar_app/src/app/app.module.ts and ArticlePageModule in /Users/mtnptrsn/Webdev/24kalmar_app/src/pages/article/article.module.ts
Did you remote debug the problem on the device already? Follow these instructions here to debug the problem in Chrome dev tools: https://ionic.zone/debug/remote-debug-your-app#android Look at the console and network tabs for errors.
When I remove it from my app.module.ts declartions I get this error:
Unhandled Promise rejection: Component SiteSelectPage is not part of any NgModule or the module has not been imported into your module. ; Zone: <root> ; Task: Promise.then ; Value: Error: Component SiteSelectPage is not part of any NgModule or the module has not been imported into your module.
When I remove my Lazily Loaded pages from app.module.ts I get Runtime Error Uncaught (in promise) Error: No component factory found for SiteSelectPage. Did you add it to @NgModule.entryComponents?