What is the app version name that will appear to users?
medium
A. "1.0.4"
B. "1.0.5"
C. "5"
D. "33"
Solution
Step 1: Identify versionName in the configuration
The versionName is set to "1.0.4" which is the user-visible version.
Step 2: Differentiate versionCode and versionName
versionCode is an internal number (5), not shown to users.
Final Answer:
"1.0.4" -> Option A
Quick Check:
versionName is user-visible version [OK]
Hint: versionName shows app version to users [OK]
Common Mistakes:
Confusing versionCode with versionName
Using targetSdkVersion as version
Ignoring quotes around versionName
4. You added minSdkVersion 21 in android/app/build.gradle but get a build error. What is the likely cause?
medium
A. You forgot to update compileSdkVersion to at least 21
B. minSdkVersion must be less than 21
C. You need to add quotes around 21
D. minSdkVersion is set in pubspec.yaml, not build.gradle
Solution
Step 1: Understand SDK version dependencies
The compileSdkVersion must be equal or higher than minSdkVersion.
Step 2: Check build.gradle for compileSdkVersion
If compileSdkVersion is lower than 21, build fails when minSdkVersion is 21.
Final Answer:
You forgot to update compileSdkVersion to at least 21 -> Option A
Quick Check:
compileSdkVersion ≥ minSdkVersion [OK]
Hint: compileSdkVersion must be ≥ minSdkVersion [OK]
Common Mistakes:
Thinking minSdkVersion must be less than 21
Adding quotes around numeric SDK versions
Trying to set minSdkVersion in pubspec.yaml
5. You want to create a new build type called staging in android/app/build.gradle that behaves like debug but with a different app ID suffix. Which snippet correctly adds this?