Toast.getView() returns null on Android 11 (API 30)

Since Android 11, custom toasts/ toast modifications are deprecated, according to Google to “protect users”. Hence why your app in Android 30 is not able to display custom toasts.

From Android Developers documentation:

Custom toast views are deprecated. Apps can create a standard text toast with the makeText(android.content.Context, java.lang.CharSequence, int)

Leave a Comment