构建后空白页Ionic2



通过以下命令:

ionic platform add android
ionic build android

我添加了平台&构建了APK文件,但在电话上运行该应用时,我面对空白屏幕。软件在ionic serve中正常工作调试时没有任何错误。我也对Ionic的建议应用程序有问题

ionic start --v2 myApp sidemenu 

预先感谢您的帮助!

在您的" config.xml"文件中添加此首选项,在您的项目的根部:

<preference name="ShowSplashScreenSpinner" value="false" />
<preference name="SplashScreen" value="screen" />
<preference name="SplashScreenDelay" value="20000" />
<preference name="FadeSplashScreen" value="true" />
<preference name="FadeSplashScreenDuration" value="300" />
<preference name="SplashScreenBackgroundColor" value="false" />

我将确保您拥有NPM和Node的最新版本。

然后确保您拥有最新版本的Ionic(2.2)

要执行此操作,您应该更新您的软件包。

"dependencies": {
"@angular/common": "2.4.8",
    "@angular/compiler": "2.4.8",
    "@angular/compiler-cli": "2.4.8",
    "@angular/core": "2.4.8",
    "@angular/forms": "2.4.8",
    "@angular/http": "2.4.8",
    "@angular/platform-browser": "2.4.8",
    "@angular/platform-browser-dynamic": "2.4.8",
    "@angular/platform-server": "2.4.8",
    "@ionic/storage": "2.0.0",
    "ionic-angular": "2.2.0",
    "ionic-native": "2.4.1",
    "ionicons": "3.0.0",
    "rxjs": "5.0.1",
    "sw-toolbox": "3.4.0",
    "zone.js": "0.7.2"
},
"devDependencies": {
    "@ionic/app-scripts": "1.1.4",
    "typescript": "2.0.9"
}

然后删除您的node_modules目录,然后运行:

npm install(或sudo npm安装)

这应该更新所有内容,并希望解决问题

相关内容

  • 没有找到相关文章

最新更新