You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Xamarin.Android.Build.Tasks] Warn wrt Google Play requirements (#1897)
Fixes: #1766
In August and November 2018, [Google will require][1] a minimum of
`$(TargetFrameworkVersion)`=v8.0 to publish/update apps.
This commit adds a new check to the `<ResolveSdks/>` task which will
emit warnings when we hit those dates. This will only happen when
`$(TargetFrameworkVersion)` < `v8.0`
If you are not targeting the Google Play store and wish to hide these
warnings, you can make use of the `/nowarn:XA0114,XA0113` command
line switch. Alternatively, update your `.csproj` to include:
<NoWarn>XA0114;XA0113</NoWarn>
[1]: https://developer.android.com/distribute/best-practices/develop/target-sdk
Copy file name to clipboardExpand all lines: Documentation/guides/messages/README.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,6 +37,8 @@
37
37
+[XA0110](xa0110.md): Disabling $(AndroidExplicitCrunch) as it is not supported by `aapt2`. If you wish to use $(AndroidExplicitCrunch) please set $(AndroidUseAapt2) to false.
38
38
+[XA0111](xa0111.md): Could not get the `aapt2` version. Please check it is installed correctly.
39
39
+[XA0112](xa0112.md): `aapt2` is not installed. Disabling `aapt2` support. Please check it is installed correctly.
40
+
+[XA0113](xa0113.md): Google Play requires that new applications must use a `$(TargetFrameworkVersion)` of v8.0 (API level 26) or above.
41
+
+[XA0114](xa0114.md): Google Play requires that application updates must use a `$(TargetFrameworkVersion)` of v8.0 (API level 26) or above.
Copy file name to clipboardExpand all lines: src/Xamarin.Android.Build.Tasks/Tasks/ResolveSdksTask.cs
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -309,6 +309,14 @@ public bool RunTask ()
309
309
returnfalse;
310
310
}
311
311
312
+
intapiLevel;
313
+
if(int.TryParse(AndroidApiLevel,outapiLevel)){
314
+
if(apiLevel<26)
315
+
Log.LogCodedWarning("XA0113",$"Google Play requires that new applications must use a TargetFrameworkVersion of v8.0 (API level 26) or above. You are currently targeting {TargetFrameworkVersion} (API level {AndroidApiLevel}).");
316
+
if(apiLevel<26)
317
+
Log.LogCodedWarning("XA0114",$"Google Play requires that application updates must use a TargetFrameworkVersion of v8.0 (API level 26) or above. You are currently targeting {TargetFrameworkVersion} (API level {AndroidApiLevel}).");
0 commit comments