禁用Android自动隐藏启动屏幕无效。

9
以下 Phonegap 项目(Phonegap Build)无法正常工作:
config.xml:
<preference name="AutoHideSplashScreen" value="false" />
<preference name="SplashScreenDelay" value="10000"/>
<gap:plugin name="org.apache.cordova.splashscreen" />

索引:

<head>
<script type="text/javascript" charset="utf-8">

window.location = 'http://www.example.com/login';

 document.AddEventListener("deviceready", OnDeviceReady, false);

    function OnDeviceReady() {
        setTimeout(function() { 
            navigator.splashscreen.hide();
        }, 6000);
    };

   </script>
  </head>

闪屏一直停留且无法加载。重定向到主页也无法正常工作。
我尝试了这个链接: PhoneGap Build iOS app has blank white screen after splash screen 以及这个链接: http://community.phonegap.com/nitobi/topics/splash_screen_autohidesplashscreen_false_not_working_iphone_ios7 (插件版本为0.2.3),但都没有效果。请问还有什么办法?
3个回答

3

启动画面插件不支持 Android 的 AutoHideSplashScreen。此外,请参阅此问题:https://issues.apache.org/jira/browse/CB-8396

至于重定向无法正常工作,请尝试使用 window.location.href = 'http://www.example.com/login';


1
现在从v3.2.0开始支持。 - jakub.g

3

-1

虽然这个链接可能回答了问题,但最好在此处包含答案的基本部分并提供参考链接。如果链接页面更改,仅链接的答案可能会失效。- 来自审查 - Lawrence Aiello
@LawrenceAiello 这不是一个仅有链接的回答。example.com 不是一个真实的网站。 - Kenster

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接