在过去的24小时里,我一直在尝试使启动屏幕适合我的应用。我尝试按照文档进行操作,但我只是不知道自己在做什么错或遗漏。 这是我用来构建的文件的链接:https://mega.nz/#!ZpRQCazY!XThPmX11okVWK4yXL_kSWZY3fHrbVrmzWFIrqQ-OUVw
从我收集到的信息来看,config.xml中的内容应该是正确的,但是当我将其上传到https://build.phonegap.com进行构建时,它不会随即启动。 (该图标可以正常工作。)
其中的网站只是一个占位符(您可以忽略它)。我没有在文件中包含启动画面插件的实际文件,但是无论是否包含插件文件,网站似乎都可以构建相同的文件。请检查config.xml和图像/路径。我不确定是什么导致了此问题。
编辑:这是配置xml的快速概述:
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.splashing.splash" version="1.0.0"
xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0">
<name>Splash</name>
<description>
Splash Screen Not Working
</description>
<author email="tempest@gmail.com" href="http://tempest.com">
tempest
</author>
<content src="index.html" />
<preference name="DisallowOverscroll" value="true" />
<preference name="android-minSdkVersion" value="14" />
<preference name='phonegap-version' value='cli-6.5.0' />
<preference name="Fullscreen" value="true" />
<plugin name="cordova-plugin-splashscreen" source="npm" spec="~5.0.2" />
<platform name="android">
<preference name="SplashShowOnlyFirstTime" value="true"/>
<preference name="SplashScreenDelay" value="3000" />
<preference name="ShowSplashScreenSpinner" value="false"/>
<preference name="splashscreen" value="splash" />
<splash src="splash.png"/>
<icon src="icon.png"/>
</platform>
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<platform name="android">
<allow-intent href="market:*" />
</platform>
</widget>
答案 0 :(得分:0)
尝试像我一样配置您的配置。这对我来说很好
<platform name="android">
<allow-intent href="market:*" />
<preference name="SplashScreenDelay" value="3000" />
<preference name="ShowSplashScreenSpinner" value="false" />
<preference name="FadeSplashScreen" value="false" />
<preference name="SplashMaintainAspectRatio" value="true" />
<preference name="SplashShowOnlyFirstTime" value="false" />
<icon density="ldpi" src="res/android/icon/drawable-ldpi-icon.png" />
<icon density="mdpi" src="res/android/icon/drawable-mdpi-icon.png" />
<icon density="hdpi" src="res/android/icon/drawable-hdpi-icon.png" />
<icon density="xhdpi" src="res/android/icon/drawable-xhdpi-icon.png" />
<icon density="xxhdpi" src="res/android/icon/drawable-xxhdpi-icon.png" />
<icon density="xxxhdpi" src="res/android/icon/drawable-xxxhdpi-icon.png" />
<splash density="hdpi" src="res/drawable-land-hdpi/splash.png" />
<splash density="ldpi" src="res/drawable-land-ldpi/splash.png" />
<splash density="mdpi" src="res/drawable-land-mdpi/splash.png" />
<splash density="xhdpi" src="res/drawable-land-xhdpi/splash.png" />
<splash density="xxhdpi" src="res/drawable-land-xxhdpi/splash.png" />
<splash density="xxxhdpi" src="res/drawable-land-xxxhdpi/splash.png" />
<splash density="hdpi" src="res/drawable-port-hdpi/splash.png" />
<splash density="ldpi" src="res/drawable-port-ldpi/splash.png" />
<splash density="mdpi" src="res/drawable-port-mdpi/splash.png" />
<splash density="xhdpi" src="res/drawable-port-xhdpi/splash.png" />
<splash density="xxhdpi" src="res/drawable-port-xxhdpi/splash.png" />
<splash density="xxxhdpi" src="res/drawable-port-xxxhdpi/splash.png" />
</platform>.