-1

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.

Error Screenshot

classes.ts

classes.module.ts

app.module.ts

app.module.ts

app.component.ts

James Z
  • 12,209
  • 10
  • 24
  • 44
Abdul Rehman
  • 3
  • 1
  • 2

3 Answers3

0

Remove ClassesPage from app.module.ts.

Note : Better keep entire content of your question into the stackoverflow instead of any other reference.

Sunil Singh
  • 11,001
  • 2
  • 27
  • 48
0

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/

Sandy.....
  • 2,833
  • 2
  • 15
  • 26
0

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.

Sachin Jagtap
  • 423
  • 3
  • 11