--- a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/MainActivity.java
+++ b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/MainActivity.java
@@ -305,7 +305,7 @@ public final class MainActivity
 			t = Toast.makeText(this, msg, duration);
 			lastToast = new WeakReference<Toast>(t);
 		} else {
-			if (Build.VERSION.SDK_INT  >= Build.VERSION_CODES.P && t.getView().isShown()) {
+			if (Build.VERSION.SDK_INT  >= 28 && t.getView().isShown()) {
 				t.cancel();
 			}
 			t.setText(msg);
