Phonegap Build - No App Icon on Device

∥☆過路亽.° 提交于 2019-12-08 08:12:14

问题


I have a small mobile app that was uploaded to Phonegap Build to bundle the app for different platform, I only insterested in the android bundle for now.

The challenge is after uploading the app and phonegap gives the apk I install on my device, the icon to launch the app on the device is the generic phonegap icon, I already added this to my config file and the files are in place correctly in the icon folder

<!-- Define app icon for each platform. -->
<icon src="icon/icon.png" />
<icon src="icon/icon_036.png"   gap:platform="android"    gap:density="ldpi" />
<icon src="icon/icon_048.png"   gap:platform="android"    gap:density="mdpi" />
<icon src="icon/icon_072.png"   gap:platform="android"    gap:density="hdpi" />

I also observed that on opening the apk with winrar in the res folder I still have the default phonegap icon in place while my splash screen has been updated and working on device normally.

Is there anything I am missing??


回答1:


I faced a similar problem. Please see if your config.xml file is in the same folder as index.html and in that same folder you make a separate folder named img and place icon.png in that folder. You are also making the mistake of not giving icon a default tag:

<icon src="img/icon.png" gap:role="default" />

give it a try!




回答2:


Go into your ProjectRoot->platforms->android->res directory

Iterate through each folder and replace "icon.png" with your custom icon image that is of the equivalent sizing.

Finally, in your root config.xml file, add:

<preference name="prerendered-icon" value="true"/>

beneath the author property.

HTH



来源:https://stackoverflow.com/questions/19901059/phonegap-build-no-app-icon-on-device

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!