生产构建中的闪屏后的白色屏幕

时间:2017-08-22 17:27:57

标签: ionic2 ionic3

我正在使用Ionic 3而且我尝试过所有的东西,但是在飞溅之后我仍然不断获得永久的白屏。

离子信息:

@ionic/cli-plugin-cordova       : 1.6.2
@ionic/cli-plugin-ionic-angular : 1.4.0
@ionic/cli-utils                : 1.7.0
ionic (Ionic CLI)               : 3.7.0

Cordova CLI : 7.0.1
@ionic/app-scripts : 2.1.4

config.xml:

<preference name="loadUrlTimeoutValue" value="700000" />
<preference name="webviewbounce" value="false" />
<preference name="UIWebViewBounce" value="false" />
<preference name="DisallowOverscroll" value="true" />
<preference name="android-minSdkVersion" value="16" />
<preference name="BackupWebStorage" value="none" />
<preference name="StatusBarStyle" value="default" />
<preference name="SplashScreen" value="screen" />
<preference name="orientation" value="default" />
<preference name="SplashMaintainAspectRatio" value="true" />
<preference name="FadeSplashScreenDuration" value="300" />
<preference name="ShowSplashScreenSpinner" value="false" />
<preference name="AutoHideSplashScreen" value="false" />
<preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />
<preference name="SplashScreenDelay" value="3000" />

的package.json:

"dependencies": {
    "@angular/animations": "4.1.3",
    "@angular/common": "4.1.3",
    "@angular/compiler": "4.1.3",
    "@angular/compiler-cli": "4.1.3",
    "@angular/core": "4.1.3",
    "@angular/forms": "4.1.3",
    "@angular/http": "4.1.3",
    "@angular/platform-browser": "4.1.3",
    "@angular/platform-browser-dynamic": "4.1.3",
    "@angular/platform-server": "4.1.3",
    "@ionic-native/camera": "3.12.1",
    "@ionic-native/contacts": "3.12.1",
    "@ionic-native/core": "3.12.1",
    "@ionic-native/crop": "^3.12.1",
    "@ionic-native/facebook": "3.12.1",
    "@ionic-native/file": "3.12.1",
    "@ionic-native/file-opener": "^4.1.0",
    "@ionic-native/image-picker": "^3.12.1",
    "@ionic-native/keyboard": "3.12.1",
    "@ionic-native/network": "3.12.1",
    "@ionic-native/splash-screen": "3.12.1",
    "@ionic-native/transfer": "3.12.1",
    "@ionic/cloud-angular": "^0.9.1",
    "@ionic/storage": "2.0.1",
    "@types/node": "^7.0.14",
    "angular-svg-round-progressbar": "^1.1.0",
    "angular2-elastic": "^0.13.0",
    "angular2-elastic-input": "^1.1.1",
    "font-awesome": "^4.7.0",
    "ionic-angular": "^3.6.0",
    "ionicons": "3.0.0",
    "lodash": "^4.17.4",
    "moment": "^2.18.1",
    "ng2-truncate": "^1.3.5",
    "rxjs": "5.1.1",
    "socket.io-client": "^1.7.3",
    "sw-toolbox": "3.6.0",
    "zone.js": "0.8.12",
    "cordova-ios": "4.3.1",
    "cordova-android": "~6.1.2",
},

我也在app.component.ts手动隐藏了启动画面。我也试过这个答案https://stackoverflow.com/a/41631799/7266219 但似乎没有工作

app.component.ts:

constructor(
  public platform: Platform,
  public storage: Storage,
  public local: Local,
  public menu: MenuController,
  public con: ConnectivityService,
  public events: Events,
  private Splashscreen: SplashScreen
) { this.platformReady(); }

platformReady() {
this.platform.ready().then(() => {
  setTimeout(() => {
    this.Splashscreen.hide();
  }, 100);
  this.listenToLoginEvents();
  this.addConnectivityListener();
  this.rootPage = "FrontPage";
});

}

函数addConnectivityListener()调用服务方法来监视网络活动并listenToLoginEvents()监视登录/注销事件

0 个答案:

没有答案