使用 cordova s​​plashscreen 插件构建的 Phonegap 未显示我的自定义启动图形

Phonegap build with cordova splashscreen plugin not showing my custom splash graphic

"custom splash graphic" 我只是指我自己的形象。无论我尝试什么,它总是只显示小 phonegap 机器人。请注意,我在这里只关心 Android 。这是我所做的:

在这一点上,老实说,我什至没有看到默认的 phonegap 机器人图像文件可能隐藏在我的项目中的什么地方,或者 config.xml 中的什么指向它。

你有没有像这样添加默认启动画面位置

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

也根据此处看到的新更新文档 http://docs.build.phonegap.com/en_US/configuring_icons_and_splash.md.html#Icons%20and%20Splash%20Screens

gap:splash 已弃用,您应该只使用 splash 标签

我发现如果你在 phonegap build 中使用 npm 添加插件它不起作用,所以以下将不起作用

  <plugin name="cordova-plugin-splashscreen" source="npm"/>

因此您以旧方式添加了插件,因此后续工作正常

<plugin name="br.com.paveisitemas.splashscreen" spec="2.1.1" source="pgb" />

Please note that in the past splash screens were specified with the gap:splash element and the platform specified with gap:platform. This is still supported but we recommend moving to splash and platform.

在我的例子中,我看到的实际上不是启动画面,而是 index.css 中设置的背景图像。因此,当应用程序显示它加载机器人图像时...这不是启动画面。