白屏离子v6.11.8电容器 [英] white screen ionic v6.11.8 capacitor
问题描述
当我尝试使用以下命令通过电容器运行应用程序时.
As i'm trying to run the app via capacitor using the command below.
ionic capacitor run android
当我在像素上或通过移动USB调试模式运行模拟器时,它成功在 android studio 4.2 canary 11 中运行,它为我提供了 白屏 在电容器启动画面之后.如果我使用chrome chrome://inspect/#devices
,它会显示我的应用程序正在运行,并且在我的控制台中,它还会显示console.log('dangggggggggggg');
,它位于initializeApp()
内,但我只能看到白屏.我已经浏览了许多页面以寻求帮助,但是由于chrome调试器也没有显示错误,因此我仍然无法弄清它的问题.这是下面的屏幕截图.
as it runs in the android studio 4.2 canary 11 successfully when i run my emulator on pixel or via mobile USB debug mode it gives me white screen after capacitor splash screen. If i use chrome chrome://inspect/#devices
it shows my app running and as i see my console it also shows me console.log('dangggggggggggg');
which is inside the initializeApp()
but i only see white screen. I have gone through many pages for help but still i can't figure out whats the issue of it as chrome debugger doesn't show error in it as well. Here is a screen shot below.
这是我遵循的网址.
为什么在Ionic 4的启动画面后白屏卡住了? /a>
https://forum.ionicframework.com/t/使用电容器时出现白屏/183825/3
https://github.com/ionic-team/capacitor/issues/960
Here are the Url's which i followed.
Why white screen stuck after splash screen in Ionic 4?
https://forum.ionicframework.com/t/white-screen-when-using-capacitor/183825/3
https://github.com/ionic-team/capacitor/issues/960
由于AMD处理器,我使用的是Android canary,而不是普通的工作室.
As i'm using android canary not regular studio because of AMD processor.
推荐答案
将我的路由"从主页"(该页面指向空白)更改为我需要查看的页面.这确实是一个令人困惑的问题,但它完全掩盖了我的角度应用路由.
Changed my Routing from 'home' which pointed to blank the page, to the page which i needed to see. Was a really confusing issue but it lied in my angular app routing altogether.
https://forum.ionicframework.com /t/ionic-v5-capacitor-white-screen/196825/3
这是我下面的代码,它指向空白页.
Here is my code below which pointed to blank page.
{
path: '',
redirectTo: 'home', // It pointed to the blank page
pathMatch: 'full'
},
{
path: 'recipes', // Used this to run the start page and it worked
children:[{
path: '',
loadChildren: () => import('./recipes/recipes.module').then(m => m.RecipesPageModule)
},
{
path: ':recipeId',
loadChildren: () => import('./recipes/recipe-detail/recipe-detail.module').then(m => m.RecipeDetailPageModule)
}
]
m.RecipesPageModule)
},
这篇关于白屏离子v6.11.8电容器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!