简体   繁体   English

cordova / phonegap在Android上具有快速加载屏幕

[英]cordova/phonegap has quick loading screen on android

When ever I load my app on android I get a grey screen with the words "player needed"(the apps name) across the top for about a second before my app actually starts. 每当我在android上加载我的应用程序时,在我的应用程序实际启动之前,都会在顶部显示灰屏,并在顶部显示“玩家需要”一词(应用程序名称)。 It does not appear on the development testing app only when I do an actual build, and then only when I start the app. 仅当我进行实际构建时才出现在开发测试应用程序中,然后仅在启动应用程序时才出现在开发测试应用程序中。 If I change windows back and forth it does not appear again. 如果我来回切换窗口,它不会再次出现。 How can I remove this? 我该如何删除? example of grey screen 灰屏的例子

Thank you! 谢谢!

You could try this, worked for me, it's something about the MainActivity theme on Android. 您可以尝试一下,为我工作,这与Android上的MainActivity主题有关。

In the "platforms\\android" folder under your project, open the AndroidManifest.xml and search for android:theme inside the <activity> tag that contains android:name="MainActivity" and change the default value (that is android:theme="@android:style/Theme.DeviceDefault.NoActionBar" ) to android:theme="@android:style/Theme.Translucent" . 在项目下的“ platforms \\ android”文件夹中,打开AndroidManifest.xml并在包含android:name="MainActivity"<activity>标记内搜索android:theme并更改默认值(即android:theme="@android:style/Theme.DeviceDefault.NoActionBar" )到android:theme="@android:style/Theme.Translucent" Save the file and build your project again, the grey screen should desapear. 保存文件并再次构建项目,灰屏消失。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM