【发布时间】:2020-04-23 21:44:44
【问题描述】:
我是 Ionic 3 的新手。我做了一个应用程序并尝试转换为 apk。
我正在使用以下 CLI 生成调试(或测试)android-debug.apk:
ionic cordova build android --prod
页面在声明和入口组件中声明。
这是我的 app.module.ts
@NgModule({
declarations: [
MyApp,
AboutPage,
ContactPage,
HomePage,
TabsPage,
LoginPage,
MobileScreenPage,
OtpScreenPage,
RegisterPage,
ForgotPasswordPage,
EditProfilePage,
MemberDetailPage
],
imports: [
BrowserModule,
HttpClientModule,
IonicModule.forRoot(MyApp)
],
bootstrap: [IonicApp],
entryComponents: [
MyApp,
AboutPage,
ContactPage,
HomePage,
TabsPage,
LoginPage,
MobileScreenPage,
OtpScreenPage,
RegisterPage,
ForgotPasswordPage,
EditProfilePage,
MemberDetailPage
],
providers: [
StatusBar,
SplashScreen,
{provide: ErrorHandler, useClass: IonicErrorHandler},
AuthServiceProvider
]
})
export class AppModule {}
错误:
【问题讨论】:
-
您编辑个人资料页面是 2 个模块的一部分。从 App Module 中删除它,它会工作,
-
如果我从 app.module.ts 中删除它,它会显示错误
Did you add it to @NgModule.entryComponents?
标签: angular typescript ionic-framework build ionic3