Struggling to get my Sony Z2 smartphone app running. Command used:
ionic build android --prod --release
Error displayed in console:
typescript error Type CirckelmovementPage in C:/Users/fearcoder/Documents/natuurkundeformules/src/pages/circkelmovement/circkelmovement.ts is part of the declarations of 2 modules: AppModule in C:/Users/fearcoder/Documents/natuurkundeformules/src/app/app.module.ts and CirckelmovementPageModule in C:/Users/fearcoder /Documents/natuurkundeformules/src/pages/circkelmovement/circkelmovement.module.ts!
Please consider moving CirckelmovementPage in
C:/Users/fearcoder/Documents/natuurkundeformules/src/pages/circkelmovement/circkelmovement.ts to a higher module that imports AppModule in C:/Users/fearcoder/Documents/natuurkundeformules/src/app/app.module.ts and CirckelmovementPageModule in C:/Users/fearcoder/Documents/natuurkundeformules/src/pages/circkelmovement/circkelmovement.module.ts.
You can also create a new NgModule that exports and includes
CirckelmovementPage in C:/Users/fearcoder/Documents/natuurkundeformules/src/pages/circkelmovement/circkelmovement.ts then import that NgModule in AppModule in C:/Users/fearcoder/Documents/natuurkundeformules/src/app/app.module.ts
and CirckelmovementPageModule in
C:/Users/fearcoder/Documents/natuurkundeformules/src/pages/circkelmovement/circkelmovement.module.ts.
Files causing issues
circkelmovement.ts
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
import { AdMobFree, AdMobFreeBannerConfig } from '@ionic-native/admob-free';
@IonicPage()
@Component({
selector: 'page-circkelmovement',
templateUrl: 'circkelmovement.html',
})
export class CirckelmovementPage {
ray:any;
circulationtime:any;
result:any;
constructor(public navCtrl: NavController, public navParams: NavParams, private admob: AdMobFree) {
}
ionViewDidLoad(){
const bannerConfig: AdMobFreeBannerConfig = {
isTesting: true,
autoShow: true
};
this.admob.banner.config(bannerConfig);
this.admob.banner.prepare()
.then(() => {
this.admob.banner.show()
})
.catch(e => console.log(e));
}
calculateWebSpeed(ray, circulationtime){
return this.result = "Baansnelheid: " + (2 * Math.PI * ray / circulationtime) + " m/s";
}
}
app.module.ts
import { BrowserModule } from '@angular/platform-browser';
import { ErrorHandler, NgModule } from '@angular/core';
import { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular';
import { SplashScreen } from '@ionic-native/splash-screen';
import { StatusBar } from '@ionic-native/status-bar';
import { AdMobFree } from '@ionic-native/admob-free';
import { InAppBrowser } from '@ionic-native/in-app-browser';
import { MyApp } from './app.component';
import { HomePage } from '../pages/home/home';
import { SpeedPage } from '../pages/speed/speed';
import { DistancePage } from '../pages/distance/distance';
import { TimePage } from '../pages/time/time';
import { WorkPage } from '../pages/work/work';
import { KinenergyPage } from '../pages/kinenergy/kinenergy';
import { GravityenergyPage } from '../pages/gravityenergy/gravityenergy';
import { GravityforcePage } from '../pages/gravityforce/gravityforce';
import { CirckelmovementPage } from '../pages/circkelmovement/circkelmovement';
import { ElectricityenergyPage } from '../pages/electricityenergy/electricityenergy';
import { LawohmPage } from '../pages/lawohm/lawohm';
import { LenslawPage } from '../pages/lenslaw/lenslaw';
import { LorentzforcewirePage } from '../pages/lorentzforcewire/lorentzforcewire';
import { DensityPage } from '../pages/density/density';
import { PressurePage } from '../pages/pressure/pressure';
import { LensstrenghtPage } from '../pages/lensstrenght/lensstrenght';
import { PowerPage } from '../pages/power/power';
import { CurrentstrenghtPage } from '../pages/currentstrenght/currentstrenght';
import { FrequencyPage } from '../pages/frequency/frequency';
import { WavespeedPage } from '../pages/wavespeed/wavespeed';
import { MassPage } from '../pages/mass/mass';
import { LorentzparticlePage } from '../pages/lorentzparticle/lorentzparticle';
@NgModule({
declarations: [
MyApp,
HomePage,
SpeedPage,
DistancePage,
TimePage,
WorkPage,
KinenergyPage,
GravityenergyPage,
GravityforcePage,
CirckelmovementPage,
ElectricityenergyPage,
LawohmPage,
LenslawPage,
LorentzforcewirePage,
DensityPage,
PressurePage,
LensstrenghtPage,
PowerPage,
CurrentstrenghtPage,
FrequencyPage,
WavespeedPage,
MassPage,
LorentzparticlePage
],
imports: [
BrowserModule,
IonicModule.forRoot(MyApp)
],
bootstrap: [IonicApp],
entryComponents: [
MyApp,
HomePage,
SpeedPage,
DistancePage,
TimePage,
WorkPage,
KinenergyPage,
GravityenergyPage,
GravityforcePage,
CirckelmovementPage,
ElectricityenergyPage,
LawohmPage,
LenslawPage,
LorentzforcewirePage,
DensityPage,
PressurePage,
LensstrenghtPage,
PowerPage,
CurrentstrenghtPage,
FrequencyPage,
WavespeedPage,
MassPage,
LorentzparticlePage
],
providers: [
StatusBar,
SplashScreen,
AdMobFree,
InAppBrowser,
{provide: ErrorHandler, useClass: IonicErrorHandler}
]
})
export class AppModule {}
circkelmovement.module.ts
import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { CirckelmovementPage } from './circkelmovement';
@NgModule({
declarations: [
CirckelmovementPage,
],
imports: [
IonicPageModule.forChild(CirckelmovementPage),
],
})
export class CirckelmovementPageModule {}
Trying to enhance app performance with the given command, but facing complications. Need guidance on what might be going wrong. Any help appreciated!
Regards