I'm working on ionic 3. My project is working correctly, but whenever I tried to build an Android release I'm facing this error.
-
2Please do not share error message in images, rather use text for that – Nico Haase Oct 18 '18 at 15:57
3 Answers
Remove ClassesPage
from app.module.ts
.
Note : Better keep entire content of your question into the stackoverflow instead of any other reference.

- 11,001
- 2
- 27
- 48
As per the error, you have declaration of ClassesPage
in two files(i.e. app.module.ts
and classpageModule.ts
). As you are using lazy-loading
, there is no need to import pages in app.module.ts
. For this you need to remove/comment ClassesPage
from app.module.ts
files declarations
and entryComponents
block.
Also it has been observed that, you have added other pages same as that of ClassesPage
. If lazy-loading
is there then you need to comment/remove these too from app.module.ts
file.
Please find detailed description of lazy loading here https://ionicacademy.com/ionic-3-lazy-loading/

- 2,833
- 2
- 15
- 26
You have added ClassesPage in two modules: AppModule and ClassesPageModule. There are 2 solutions for this: 1.> If you need component in one module only, then only import in that or 2.> Import ClassesPage in a seperate third module, add in declarations and in exports, and then import this third module to both AppModule and ClassesPageModule.
But if I am not wrong, you are only using ClassesPage in ClassesPageModule. So it will be better if you delete ClassesPage from AppModule. Also add ClassesPage to the bootstrap of ClassesPageModule.

- 423
- 3
- 11