Phonegap Build , App icon does not apear

无人久伴 提交于 2019-12-07 23:44:24

问题


I am updating my currently app. Having problems with getting my app icon to show in notification using the Local Notification plugin. https://github.com/katzer/cordova-plugin-local-notifications/

I have my notification setup as:

    window.plugin.notification.local.schedule({
    id: id,
    ongoing: true,
    autoCancel: false,
    autoClear: false,
    title: "Now Playing:",
    text: title,
    icon: "res://icon.png",
    smallIcon: "res://icon.png",
}); 

I have an icon.png file in the following locations:

/www
/www/img
/www/res

And even tried the icon and smallIcon values without the res:// but it does not seem to work.

I keep getting a default android notification icon, looks like a bell.

Can anyone please help. Thank You.


回答1:


Had this problem too. It is due to Phonegap build updating to cli-6.5.0 that happened yesterday. I downgraded to cli-6.0.0 and it worked normally. Simply add this to your config.xml:

<preference name="phonegap-version" value="cli-6.0.0"/>

P.S. Could also work with other versions (for example 6.4.0) but haven't tried it since the above worked.



来源:https://stackoverflow.com/questions/42102449/phonegap-build-app-icon-does-not-apear

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