我正在尝试使用 flutter_local_notifications 插件向我的应用程序添加通知,但 AndroidInitializationSettings 需要可绘制资源并在未提供时抛出此错误:
"PlatformException (PlatformException(INVALID_ICON, The resource could not be found. Please make sure it has been added as a drawable resource to your Android head project., null))"
问题是不知道Android head项目在哪
最佳答案
希望你已经用上面回答的方法解决了它,但我已经用现有的应用程序图标用另一种方法解决了。
var initializationSettingsAndroid =
new AndroidInitializationSettings('@mipmap/ic_launcher');
关于flutter_local_notifications : "PlatformException (PlatformException(INVALID_ICON, 找不到资源)),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55820299/