我无法解决我的问题,也许有人可以提供帮助。
我做了什么:
将一些代码放到我的config.xml中,就像这里的文档http://docs.phonegap.com/en/4.0.0/config_ref_images.md.html
我更改了所有图标和屏幕。
构建android平台后,图标全部正确 文件夹.....平台/ android / res / 可绘制,平台/ android / res / drawable-hdpi 等等....
比使用phonegap build构建我的应用程序。
phonegap build会忽略我的图标吗? - 为什么?
我输入config.xml的代码
<!-- app icon . -->
<platform name="android">
<icon src="www/res/icon.png"/>
<icon src="www/res/icon/android/icon-36-ldpi.png" density="ldpi" />
<icon src="www/res/icon/android/icon-48-mdpi.png" density="mdpi" />
<icon src="www/res/icon/android/icon-72-hdpi.png" density="hdpi" />
<icon src="www/res/icon/android/icon-96-xhdpi.png" density="xhdpi" />
</platform>
<!-- splash screen . -->
<platform name="android">
<splash src="www/res/screen/android/screen-hdpi-landscape.png" density="land-hdpi"/>
<splash src="www/res/screen/android/screen-ldpi-landscape.png" density="land-ldpi"/>
<splash src="www/res/screen/android/screen-mdpi-landscape.png" density="land-mdpi"/>
<splash src="www/res/screen/android/screen-xhdpi-landscape.png" density="land-xhdpi"/>
<splash src="www/res/screen/android/screen-hdpi-portrait.png" density="port-hdpi"/>
<splash src="www/res/screen/android/screen-ldpi-portrait.png" density="port-ldpi"/>
<splash src="www/res/screen/android/screen-mdpi-portrait.png" density="port-mdpi"/>
<splash src="www/res/screen/android/screen-xhdpi-portrait.png" density="port-xhdpi"/>
</platform>
谢谢...
答案 0 :(得分:1)
所以我为我找到了一个解决方案,也许它也有助于其他人。图标和splashscreen现在都可以使用。重要的更改是将此行<icon src="res/icon.png" />
用于显示图标。对于屏幕,您可以尝试此<gap:splash src="res/screen.png" />
<gap:plugin name="org.apache.cordova.splashscreen" />
<feature name="PushPlugin">
<param name="android-package" value="com.phonegap.plugins.PushPlugin" />
</feature>
<!-- app icon . -->
<icon src="res/icon.png" />
<platform name="android">
<icon src="www/res/icon/android/icon-36-ldpi.png" density="ldpi" />
<icon src="www/res/icon/android/icon-48-mdpi.png" density="mdpi" />
<icon src="www/res/icon/android/icon-72-hdpi.png" density="hdpi" />
<icon src="www/res/icon/android/icon-96-xhdpi.png" density="xhdpi" />
</platform>
<!-- splash screen . -->
<gap:splash src="res/screen.png" />
<platform name="android">
<splash src="www/res/screen/android/screen-hdpi-landscape.png" density="land-hdpi"/>
<splash src="www/res/screen/android/screen-ldpi-landscape.png" density="land-ldpi"/>
<splash src="www/res/screen/android/screen-mdpi-landscape.png" density="land-mdpi"/>
<splash src="www/res/screen/android/screen-xhdpi-landscape.png" density="land-xhdpi"/>
<splash src="www/res/screen/android/screen-hdpi-portrait.png" density="port-hdpi"/>
<splash src="www/res/screen/android/screen-ldpi-portrait.png" density="port-ldpi"/>
<splash src="www/res/screen/android/screen-mdpi-portrait.png" density="port-mdpi"/>
<splash src="www/res/screen/android/screen-xhdpi-portrait.png" density="port-xhdpi"/>
</platform>