build.gradle – application ID and versions

The application ID value is what makes an app unique in Play Store and the Android system. A good practice is to use the organization domain as the package and have the app name following it. In our case, we are using com.example.handson as the application ID. Make sure to review this value, as it cannot be changed after you upload the app to the store.

You can find this code in the android/app/build.gradle file, inside the defaultConfig section:

defaultConfig {
applicationId "com.example.handson"
minSdkVersion 16
targetSdkVersion 28
multiDexEnabled true
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

As you can see, we can change more settings than just changing applicationId. In Flutter, SDK versions are typically changed in two cases:

  • If the framework requirements change
  • If we use some library that requires a higher minimum SDK version
We can, for sure, change it to our own required value if we want, but make sure to follow the framework requirements.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.33.87