必要なドロアブルをNotification.Builderに設定していますが、解決できないと言います。私は自分自身をwuno_launcher
と追加しても動作しないので、動作しないic_launcher
を使用しようとしました。Android設定のアイコンを通知ビルダーに設定する
private Notification getNotification(String content) {
Notification.Builder builder = new Notification.Builder(this);
builder.setContentTitle("New Affirmation");
builder.setContentText(content);
builder.setSmallIcon(R.drawable.wuno_launcher); // error here cannot resolve symbol
return builder.build();
}
ただし、次の図のようにアイコンが追加されていることを確認しています。
'ic_launcher'iconsは' mipmap'フォルダに置いてください。他のドロワブルを 'drawable'フォルダに移動してください(例えば' drawable-xhdpi') –
おかげさまで私はそれを試してみます – wuno