Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to know which Android API version is my flutter app using?

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.

like image 514
Joseph Arriaza Avatar asked Jan 23 '19 16:01

Joseph Arriaza


People also ask

How do I check my Android version on Flutter app?

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.

How do I know my Android API version?

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.

How do I check my application version in Flutter?

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.

What Android SDK does Flutter use?

By default, Flutter uses the version of the Android SDK where your adb tool is based.


2 Answers

You can use device_info package:

DeviceInfoPlugin deviceInfoPlugin = DeviceInfoPlugin();
final androidInfo = await deviceInfoPlugin.androidInfo;
return androidInfo.version.sdkInt;

like image 168
Ryan Avatar answered Sep 19 '22 09:09

Ryan


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"
    }
like image 26
Rahmat Ali Avatar answered Sep 22 '22 09:09

Rahmat Ali