Apache的科尔多瓦启动画面没有显示在安卓 [英] Apache Cordova splash screens not showing in Android

查看:177
本文介绍了Apache的科尔多瓦启动画面没有显示在安卓的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我运行Apache科尔多瓦3.6.3-0.2.13。我试图让启动画面工作。我跟在<一个文档href="http://cordova.apache.org/docs/en/3.6.0/config_ref_images.md.html#Icons%20and%20Splash%20Screens">http://cordova.apache.org/docs/en/3.6.0/config_ref_images.md.html#Icons%20and%20Splash%20Screens.这些图标的工作,但没有成功的启动画面。我们还利用在科尔多瓦顶部的离子框架(1.2.8版)。

I am running Apache Cordova 3.6.3-0.2.13. And I try to get the splash screens working. I have followed the documentation on http://cordova.apache.org/docs/en/3.6.0/config_ref_images.md.html#Icons%20and%20Splash%20Screens. And the icons are working, but no success for the splash screens. We are also using the Ionic framework (version 1.2.8) on top of Cordova.

我做了什么:

添加图标和闪屏从项目的根到config.xml:

<preference name="SplashScreen" value="splash"/>
<preference name="SplashScreenDelay" value="10000"/>
<platform name="android">
  <icon src="icons/icon.png"/>

  <!-- you can use any density that exists in the Android project -->
  <splash src="icons/android-splash-land-hdpi.png" density="land-hdpi"/>
  <splash src="icons/android-splash-land-ldpi.png" density="land-ldpi"/>
  <splash src="icons/android-splash-land-mdpi.png" density="land-mdpi"/>
  <splash src="icons/android-splash-land-xhdpi.png" density="land-xhdpi"/>

  <splash src="icons/android-splash-port-hdpi.png" density="port-hdpi"/>
  <splash src="icons/android-splash-port-ldpi.png" density="port-ldpi"/>
  <splash src="icons/android-splash-port-mdpi.png" density="port-mdpi"/>
  <splash src="icons/android-splash-port-xhdpi.png" density="port-xhdpi"/>
</platform>

Ofcourse的图标目录存在,也是文件到位。当我建立与离子运行Android项目科尔多瓦运行Android 。构建过程还创建的图标和闪屏到平台/安卓/ RES /绘制目录!

Ofcourse the icons directory exists and also the files are in place. When I build the project with ionic run android or cordova run android. The build process also creates the icons and splash screens into the platforms/android/res/drawable directory!

也位于配置文件平台/安卓/ RES / XML / config.xml中正确更新和&LT; preference&GT ; &LT;图标&GT; &LT;飞溅&GT; 元素到位

Also the config file located at platforms/android/res/xml/config.xml is correctly updated and the <preference> and <icon> and <splash> elements are in place.

我也试过用 org.apache.cordova.splashscreen 插件,也没有成功。我已经加入了插件与离子插件添加org.apache.cordova.splashscreen 键,还增加了 onDeviceReady 的$ C $ ç navigator.splashscreen.show(); 。但是,这也说明不了什么。

I also tried with the org.apache.cordova.splashscreen plugin and also no success. I have added the plugin with ionic plugin add org.apache.cordova.splashscreen and also added onDeviceReady the code navigator.splashscreen.show();. But this also shows nothing.

我是什么在这里失踪?

推荐答案

只是有这个问题我自己。更改此

Just had this problem myself. Change this

<preference name="SplashScreen" value="splash"/>

<preference name="SplashScreen" value="screen"/>

这固定它。

来源: <一href="http://forum.ionicframework.com/t/need-help-with-displaying-splash-screen-on-android-cordova-3-6/10436/12">http://forum.ionicframework.com/t/need-help-with-displaying-splash-screen-on-android-cordova-3-6/10436/12

这篇关于Apache的科尔多瓦启动画面没有显示在安卓的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆