diff --git a/shell/platform/android/io/flutter/view/FlutterView.java b/shell/platform/android/io/flutter/view/FlutterView.java index 4f1f151d74705..f7a8dacac61c9 100644 --- a/shell/platform/android/io/flutter/view/FlutterView.java +++ b/shell/platform/android/io/flutter/view/FlutterView.java @@ -345,7 +345,11 @@ private void setLocales(Configuration config) { List data = new ArrayList(); data.add(locale.getLanguage()); data.add(locale.getCountry()); - data.add(locale.getScript()); + if (Build.VERSION.SDK_INT >= 21) { + data.add(locale.getScript()); + } else { + data.add(""); + } data.add(locale.getVariant()); mFlutterLocalizationChannel.invokeMethod("setLocale", Arrays.asList(locale.getLanguage(), locale.getCountry(), locale.getScript(), locale.getVariant()));