我有一個離子專案,所以在我運行這個構建之后
ionic cordova run ios -l --consolelogs --target='2E565780-E17E-4358-8DD0-FFA9681D5F8C'
通常它作業正常,但不知何故現在我得到了錯誤。觸發啟影片面后,它總是向我顯示空白螢屏。我已經把這個功能
ngOnInit() {
console.log(this.platform);
this.platform.ready().then(() => {
if (this.platform.is("cordova")) {
this.statusBar.styleDefault();
this.splashScreen.hide();
});
}
在 app.component 上,但似乎沒有觸發。有沒有我錯過的作業?任何幫助將非常感激。
uj5u.com熱心網友回復:
嘗試從您的 app.component 建構式中添加要執行的函式:
constructor( ... ){
this.initializeApp();
}
initializeApp(){
this.platform.ready().then(() => {
if (this.platform.is("cordova")) {
this.statusBar.show();
this.statusBar.styleDefault();
this.splashScreen.hide();
}
});
}
uj5u.com熱心網友回復:
我解決了這個問題,它與我添加的插件有關,所以我嘗試這樣做
- 卸載插件
- 洗掉ios檔案夾
- 全新安裝節點模塊
- 添加插件
- 添加ios檔案夾
希望對遇到同樣問題的人有所幫助。
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/422370.html
標籤:
上一篇:SQLServer子表中有資料時如何發送true或false?
下一篇:如何解決Ionic5上的此錯誤(
