-
Notifications
You must be signed in to change notification settings - Fork 560
Description
Google has the following guidance for these three values:
minSdkVersion (lowest possible) <= targetSdkVersion == compileSdkVersion (latest SDK)
- We should throw a warning if the
targetSdkVersion
is lower thancompileSdkVersion(TargetFrameworkVersion)
.
targetSdkVersion < compileSdkVersion(TargetFrameworkVersion)
Sample warning message text:
Your application is running on a version of Android that is more recent than your targetSdkVersion specifies. Set your targetSdkVersion to the highest version of Android available to match your TargetFrameworkVersion.
EX:
Your application is running on a version of Android (26) that is more recent than your targetSdkVersion specifies (24). Set your targetSdkVersion to the highest version of Android available to match your TargetFrameworkVersion (26).
Currently there is a warning in this area, but it doesn't let the developer know exactly what "ACW compilation is" or how they can fix the issue:
warning XA4211: AndroidManifest.xml //uses-sdk/@android:targetSdkVersion '19' is less than $(TargetFrameworkVersion) ''. Using API-26 for ACW compilation.
- We should throw an error if the
compileSdkVersion(TargetFrameworkVersion)
is lower thantargetSdkVersion
.
compileSdkVersion(TargetFrameworkVersion) < targetSdkVersion
Sample error message text:
The TargetFrameworkVersion should not be lower than targetSdkVersion.
EX:
The TargetFrameworkVersion (26) should not be lower than targetSdkVersion (27)
- We should throw an error if the
minSdkVersion
is greater thantargetSdkVersion
.
minSdkVersion > targetSdkVersion
Sample error message text:
The minSdkVersion is greater than targetSdkVersion. Please change the value such that minSdkVersion is less than or equal to targetSdkVersion.
EX:
The minSdkVersion (26) is greater than targetSdkVersion. Please change the value such that minSdkVersion is less than or equal to targetSdkVersion (25).