回答:
もしかしてNotification.Builder.setLargeIcon(Bitmap)、そうでしょう?:)
Bitmap largeIcon = BitmapFactory.decodeResource(getResources(), R.drawable.large_icon);
notBuilder.setLargeIcon(largeIcon);
これは、リソース画像をAndroidに変換する優れた方法ですBitmap。
... E/CommitToConfigurationOperation: Malformed snapshot token (size):  ... E/NotificationService: Not posting notification with icon==0: Notification(pri=0 contentView=null vibrate=null sound=content://settings/system/notification_sound defaults=0x0 flags=0x10 color=0x00000000 vis=PRIVATE) ... E/NotificationService: WARNING: In a future release this will crash the app:...
                    Drawable myDrawable = getResources().getDrawable(R.drawable.logo);
Bitmap myLogo = ((BitmapDrawable) myDrawable).getBitmap();
API 22 getResources().getDrawable()は非推奨であるため、次のソリューションを使用できます。
Drawable vectorDrawable = VectorDrawableCompat.create(getResources(), R.drawable.logo,  getContext().getTheme());
Bitmap myLogo = ((BitmapDrawable) vectorDrawable).getBitmap();
              Bitmap bitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.my_drawable);
Contextあなたの現在のことができますActivity。
DrawableリソースをAndroidのビットマップに変換する別の方法を次に示します。
Drawable drawable = getResources().getDrawable(R.drawable.input);
Bitmap bitmap = ((BitmapDrawable)drawable).getBitmap();
              ではres/drawable、フォルダ、
1.新しいを作成しますDrawable Resources。
2.ファイル名を入力します。
res/drawableフォルダ内に新しいファイルが作成されます。
新しく作成したファイル内のこのコードを置き換えic_action_back、ドローアブルファイル名に置き換えます。
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
    android:src="@drawable/ic_action_back"
    android:tint="@color/color_primary_text" />
これで、リソースIDとともに使用できますR.id.filename。