问题
I'm using Visual Studio 2013 with the Multi-Device Hybrid Apps CTP 2.0. In the project template, there are several placeholder splashscreens and icons for Android: ldpi, mdpi, hdpi and xhdpi densities. How can I get support for xxhdpi and xxxhdpi densities? I tried following:
- Added files to
res/icons/android
(icon-144-xxhdpi.png) andres/screens/android
(screen-xxhdpi.png) - Added icon specification to config.xml according to Cordova docs
The xxhdpi images are not present in the APK file after a build.
回答1:
Currently Visual Studio does not support xxhdpi or xxxhdpi and therefore xxhdpi.png images does make it to package (.apk). VS CPT2.0 supports below listed resolution and you can see the complete list across different platforms here http://msdn.microsoft.com/en-us/library/dn757053.aspx#VisualAssets
Workaround to include xxhdpi or xxxhdpi resources to package:
- Create the Multi-Device Hybrid Apps project or open any existing project.
- Build the project
- Go to bld\Debug\platforms\android\res
- Add folder for xxhdpi or xxxhdpi res like

- Build the project. Do not re-build.
Now all the resources present under bld\Debug\platforms\android\res will be add to package (*.apk)
Supported icon and screen resources in Visual Studio Multi-Device Hybrid Apps CTP 2.0:
- icon-36-ldpi.png
- icon-48-mdpi.png
- icon-72-hdpi.png
- icon-96-xhdpi.png
icon-96-xhdpi.png
screen-xhdpi-landscape.png
- screen-hdpi-landscape.png
- screen-mdpi-landscape.png
- screen-ldpi-landscape.png
- screen-xhdpi-portrait.png
- screen-hdpi-portrait.png
- screen-mdpi-portrait.png
- screen-ldpi-portrait.png
来源:https://stackoverflow.com/questions/25767545/multi-device-hybrid-apps-support-for-xxhdpi-and-xxxhdpi-densities-on-android