Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 11f5037

Browse files
uemancbracken
authored andcommitted
Write MINIMAL_SDK to exception message
This changes writes the required and current Android SDK level to the exception message. This enables Crash Reporting tools to capture more information about this crash.
1 parent ca5642c commit 11f5037

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,10 +240,8 @@ public void clearFocus(int viewId) {
240240

241241
private void ensureValidAndroidVersion() {
242242
if (Build.VERSION.SDK_INT < MINIMAL_SDK) {
243-
Log.e(TAG, "Trying to use platform views with API " + Build.VERSION.SDK_INT
244-
+ ", required API level is: " + MINIMAL_SDK);
245-
throw new IllegalStateException("An attempt was made to use platform views on a"
246-
+ " version of Android that platform views does not support.");
243+
throw new IllegalStateException("Trying to use platform views with API "
244+
+ Build.VERSION.SDK_INT + ", required API level is: " + MINIMAL_SDK);
247245
}
248246
}
249247
};

0 commit comments

Comments
 (0)