2013-10-06 2 views
3

이 페이지의 지침에 따라 http://cordova.apache.org/docs/en/3.1.0/cordova_splashscreen_splashscreen.md.html#Splashscreen 스플래시 화면을 테스트하려면 다음 코드를 config에 추가해야하지만 다음은 유효한 CML이 아니기 때문에 나는 그것에 오류가있어.config.XML의 Cordova 스플래시 화면 환경 설정 이름

<preference name="splashscreen", "splash" /> 
<preference name="splashScreenDelay", 10000 /> 

또한

<preference name="splashscreen", value="splash" /> 
<preference name="splashScreenDelay", value="10000" /> 
자동으로 config.xml 파일에서 제거 또한 초과 오류를 성공적으로 구축,하지만 한 번 한 후 다음과 같은 환경을 구축, 아래와 같이 유효한 XML에 기본 설정 이름을 변경하는 것입니다 시도 내 스플래시 화면이 작동 얻기 위해 그것을 따를 수 있도록

는 샘플의 소스가

답변

2

이 있어야한다 :

<preference name="splashscreen" value="splash" /> 
<preference name="splashScreenDelay" value="10000" /> 
폰갭 문서는 종종 매우 사기입니다

...

+0

및 값 = "시작"무엇 : 코르도바 4.0 시작 화면에 대한 네이티브 지원이의 config.xml 파일에서이 예제는 명확하게해야합니까? 그것은 길입니까? – Toolkit

3

나는 기능 CLI를 사용하여 설치하는 다음과 같습니다

<feature name="SplashScreen"> 
    <param name="android-package" value="org.apache.cordova.splashscreen.SplashScreen" /> 
</feature> 

문서는 말한다 :

<feature name="SplashScreen"> 
    <param name="android-package" value="org.apache.cordova.SplashScreen" /> 
</feature> 

나는이 조합을 사용 작동했습니다 :

<preference name="splashscreen" value="splash" /> 
<preference name="splashScreenDelay" value="10000" /> 

<feature name="SplashScreen"> 
    <param name="android-package" value="org.apache.cordova.splashscreen.SplashScreen" /> 
</feature> 
+0

welcome to stackoverflow! –

+1

"이론 상으로는 이론과 실습간에 차이가 없다. 실제로는 거기에있다." 잊지 마라 :-) – Nicramus

3

fut 위의 대답은 오래된 것입니다.

<platform name="android"> 
    <!-- you can use any density that exists in the Android project --> 
    <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> 

<platform name="ios"> 
    <!-- images are determined by width and height. The following are supported --> 
    <splash src="res/screen/ios/Default~iphone.png" width="320" height="480"/> 
    <splash src="res/screen/ios/[email protected]~iphone.png" width="640" height="960"/> 
    <splash src="res/screen/ios/Default-Portrait~ipad.png" width="768" height="1024"/> 
    <splash src="res/screen/ios/[email protected]~ipad.png" width="1536" height="2048"/> 
    <splash src="res/screen/ios/Default-Landscape~ipad.png" width="1024" height="768"/> 
    <splash src="res/screen/ios/[email protected]~ipad.png" width="2048" height="1536"/> 
    <splash src="res/screen/ios/[email protected]~iphone.png" width="640" height="1136"/> 
    <splash src="res/screen/ios/Default-667h.png" width="750" height="1334"/> 
    <splash src="res/screen/ios/Default-736h.png" width="1242" height="2208"/> 
    <splash src="res/screen/ios/Default-Landscape-736h.png" width="2208" height="1242"/> 
</platform> 
+0

config.xml이 www가 아닌 ​​루트 디렉토리에 있다면, www/your src 속성의 접두어를 붙이면된다. – andreszs

+0

이미지가'www/res/...'에 없지만'res/...'에 있으면 위와 같이 정상입니다. 그런 식으로 따라 갔고 효과가 있습니다. 물론, 'merges' 폴더와 아마도 다른 것들도 www 이상에서 작동하지는 않지만 그 자체로 위의 설정이 작동합니다. (적어도 안드로이드 부분) – Giszmo

관련 문제