Icon and splash screen for Cordova Project __cordova

Source: Internet
Author: User

The Config.xml file in the

Phonegap/cordova project, which has the following contents configured:

<icon gap:platform= "Android" gap:qualifier= "ldpi" src= "Res/icon/android/icon-36-ldpi.png"/> <icon Gap: Platform= "Android" gap:qualifier= "mdpi" src= "Res/icon/android/icon-48-mdpi.png"/> <icon gap:platform= " Android "gap:qualifier=" hdpi "src=" Res/icon/android/icon-72-hdpi.png "/> <icon gap:platform=" Android "Gap: Qualifier= "xhdpi" src= "Res/icon/android/icon-96-xhdpi.png"/> <icon gap:platform= "BlackBerry" src= "res/icon/ Blackberry/icon-80.png "/> <icon gap:platform=" BlackBerry "gap:state=" hover "src=" res/icon/blackberry/ Icon-80.png "/> <icon gap:platform=" ios "height=" src= "Res/icon/ios/icon-57.png" width= ","/> <icon, Gap :p latform= "ios" height= "src=" Res/icon/ios/icon-72.png "width=" "/>" <icon "ios" gap:platform= "114" Src= "Res/icon/ios/icon-57-2x.png" width= "114"/> <icon gap:platform= "ios" height= "144" src= "res/icon/ios/" Icon-72-2x.png "width=" 144 "/> <icon gap:platform=" webOS "src=" res/icon/webos/icon-64.png "/> <icon gap:platform= "winphone" src= "Res/icon/windows-phone/icon-48.png"/> <icon gap:platform= "Winphone" "gap:role=" Background "src=" Res/icon/windows-phone/icon-173.png "/> <gap:splash gap:platform=" Android "Gap: Qualifier= "port-ldpi" src= "Res/screen/android/screen-ldpi-portrait.png"/> <gap:splash gap:platform= "Android "Gap:qualifier=" "port-mdpi" src= "Res/screen/android/screen-mdpi-portrait.png"/> <gap:splash gap:platform= " Android "gap:qualifier=" port-hdpi "src=" Res/screen/android/screen-hdpi-portrait.png "/> <gap:splash Gap: Platform= "Android" gap:qualifier= "port-xhdpi" src= "Res/screen/android/screen-xhdpi-portrait.png"/> <gap: Splash gap:platform= "BlackBerry" src= "res/screen/blackberry/screen-225.png"/> <gap:splash "ios" height= "src=" res/screen/ios/screen-iphone-portrait.png "width="/> <gap:splash "ios" height= "960" src= "Res/screen/ios/screen-iphone-portrait-2x.png" width= "640"/> &LT;GAP:SPLAsh gap:platform= "ios" height= "1136" src= "Res/screen/ios/screen-iphone-portrait-568h-2x.png" width= "640"/> < Gap:splash gap:platform= "ios" height= "1024" src= "Res/screen/ios/screen-ipad-portrait.png" width= "768"/> <gap: Splash gap:platform= "ios" height= "768" src= "Res/screen/ios/screen-ipad-landscape.png" width= "1024"/> <gap: Splash gap:platform= "Winphone" src= "Res/screen/windows-phone/screen-portrait.jpg"/>

This res/icon and Res/screen directory is relative to the PHONEGAP project directory, which is similar to Phonegap/res/icon/android/icon-36-ldpi.png, your icon and splash screen must be in both directories.

phonegap3.5 the previous Config.xml src= "res/...", phonegap3.5 began to src= "www/res/..." and the actual icon and splash file are all present under the www/res of the. Therefore, phonegap3.4 does not apply the icon and splash screen is justifiable (because the path does not specify the right).

However, although the SRC changed to "www/res/...", we also put our own icon and splash file in the phonegap/www/res/... Under

But the last build after the Android project and the iOS project, icon and splash screen is still not our own.

Later, I looked at the Cordova document and made some modifications to Config.xml before I was able to configure it successfully.

1, remove the above Config.xml icon and splash screen configuration, change to the following

<platform name= "Android" > <icon src= "res/icon/android/icon-36-ldpi.png" density= "ldpi"/> <icon "src=" R Es/icon/android/icon-48-mdpi.png "density=" mdpi "/> <icon src=" res/icon/android/icon-72-hdpi.png "density=" hdpi "/> <icon src=" res/icon/android/icon-96-xhdpi.png "density=" xhdpi "/> <splash src=" Res/screen/androi D/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 "/> &Lt;/platform> <platform name= "ios" > <icon src= "res/icon/ios/icon-60@3x.png" width= "180" height= "180"/> <icon src= "Res/icon/ios/icon-60.png" width= "height="/> <icon "src=" width Ios/icon-76@2x.png "width=" 152 "height=" 152 "/> <icon src=" res/icon/ios/icon-40.png "width=" "height=" 40 " > <icon src= "res/icon/ios/icon-40@2x.png" width= "height="/> <icon "src=" res/icon/ios/icon.png H= "height="/> <icon src= "res/icon/ios/icon@2x.png" width= "114" height= "114"/> <icon src= "Res/icon" /ios/icon-72.png "width=" "height=" "/> <icon src=" res/icon/ios/icon-72@2x.png "width=" 144 "height=" 144 "/&
  Gt <icon src= "Res/icon/ios/icon-small.png" width= "height=/>" <icon
  "Width=" height= "/>"<icon src= "Res/icon/ios/icon-50.png" width= "height="/> <icon "src=" width  = "height="/> <splash src= "res/screen/ios/default~iphone.png" width= "the" height= "" "/> <splash Src= "Res/screen/ios/default@2x~iphone.png" width= "640" height= "960"/> <splash src= "res/screen/ios/ Default-portrait~ipad.png "width=&
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

Tags Index: