Cordova Android应用程序启动画面空白

时间:2017-07-12 07:32:16

标签: android angularjs cordova cordova-plugins

应用程序按预期工作,但启动画面为空白:

    <?xml version='1.0' encoding='utf-8'?>
<widget id="io.cordova.hellocordova" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
    <name>Flames</name>
    <description>
        A Sample app for Flames ab
  </description>
  <author email="nagarajnaidu921@gmail.com" href="http://cordova.io">
      Nagaraj
  </author>
  <content src="index.html" />
  <access origin="*" />

  <preference name="SplashScreenDelay" value="10000" />
    <preference name="SplashScreen" value="screen" />
    <preference name="SplashScreenDelay" value="10000" />
    <splash src="splash.png" />

  <allow-intent href="http://*/*" />
  <allow-intent href="https://*/*" />
  <allow-intent href="tel:*" />
  <allow-intent href="sms:*" />
  <allow-intent href="mailto:*" />
  <allow-intent href="geo:*" />
  <platform name="android">
    <allow-intent href="market:*" />
    <icon density="mdpi" src="res/icon/android/mipmap-mdpi/ic_launcher.png" />
    <icon density="hdpi" src="res/icon/android/mipmap-hdpi/ic_launcher.png" />
    <icon density="xhdpi" src="res/icon/android/mipmap-xhdpi/ic_launcher.png" />
    <icon density="xxhdpi" src="res/icon/android/mipmap-xxhdpi/ic_launcher.png" />
    <icon density="xxxhdpi" src="res/icon/android/mipmap-xxxhdpi/ic_launcher.png" />

    <splash src="res/screen/android/splash-land-hdpi.png" density="land-hdpi"/>
    <splash src="res/screen/android/splash-land-ldpi.png" density="land-ldpi"/>
    <splash src="res/screen/android/splash-land-mdpi.png" density="land-mdpi"/>
    <splash src="res/screen/android/splash-land-xhdpi.png" density="land-xhdpi"/>

    <splash src="res/screen/android/splash-port-hdpi.png" density="port-hdpi"/>
    <splash src="res/screen/android/splash-port-ldpi.png" density="port-ldpi"/>
    <splash src="res/screen/android/splash-port-mdpi.png" density="port-mdpi"/>
    <splash src="res/screen/android/splash-port-xhdpi.png" density="port-xhdpi"/>
</platform>
<engine name="android" spec="^6.2.3" />
<plugin name="cordova-plugin-whitelist" spec="^1.3.2" />
<plugin name="cordova-plugin-splashscreen" spec="^4.0.3" />
</widget>

1 个答案:

答案 0 :(得分:0)

我遇到了同样的问题,更新了适用于我的cordova版本,同时我添加了cordova资源插件,之后我就能看到启动画面。