Skip to content

Consider bumping the Android min SDK from 16 to 19 #82000

@blasten

Description

@blasten

According to Android Studio, 98.1% of users are running Android SDK 19 or higher.

Platform views require SDK 19. In an effort to update the SDK constraint in WebView, and Google Maps, some users will receive a build failure if they add one of these plugins to their pubspec.yaml:

uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [:webview_flutter] /tmp/cirrus-ci-build/all_plugins/build/webview_flutter/intermediates/library_manifest/release/AndroidManifest.xml as the library might be using APIs not available in 16
	Suggestion: use a compatible library with a minSdk of at most 16,
		or increase this project's minSdk version to at least 19,
		or use tools:overrideLibrary="io.flutter.plugins.webviewflutter" to force usage (may lead to runtime failures)

FAILURE: Build failed with an exception.

Note that the current state is: "Your app will crash on Android <20" if you use virtual displays. Unfortunately, this is the common case if they install Google Maps today, or WebView prior to hybrid composition, but since the impact is small this hasn't been bumped in the queue.

Another consideration is that we don't have proper coverage on these SDK versions.

I also think that some code paths in the engine can be removed, and implementations simplified with higher hit rates.

Another possible option is to add code to the Flutter tool to capture these situations, and provide a more user Friendly message if the conclusion is that 1.9% is still high and significant for us.

cc @tvolkert @Hixie

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work listc: proposalA detailed proposal for a change to Flutterplatform-androidAndroid applications specificallyteam-androidOwned by Android platform teamtriaged-androidTriaged by Android platform team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions