I need to know which Android API version is my Flutter app using, I need to change it too if that's like the 29 API to support Android 6.0 using API 26 I guess.
To get the device operating system version that your Flutter app is running on, just import dart:io and use Platform. operatingSystemVersion. No third-party package or installation is required.
Tap the "Software Information" option on the About Phone menu. The first entry on the page that loads will be your current Android software version.
In main. dart (or wherever your app is initialized), create an instance of NewVersion . final newVersion = NewVersion(); The plugin will automatically use your Flutter package identifier to check the app store.
By default, Flutter uses the version of the Android SDK where your adb tool is based.
You can use device_info package:
DeviceInfoPlugin deviceInfoPlugin = DeviceInfoPlugin();
final androidInfo = await deviceInfoPlugin.androidInfo;
return androidInfo.version.sdkInt;
You can check the SDK information in the file: <your app root>\android\app\build.gradle
. The SDK version information can be find in defaultConfig
. Please check it below:
defaultConfig {
applicationId "some.some.some"
minSdkVersion 16 <--- here
targetSdkVersion 28 <--- here
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With