-
Notifications
You must be signed in to change notification settings - Fork 63
Description
If you attempt to compile an application using the latest AndroidX.Core 1.7.0.1 package using an application with an API level lower than 31, you get the following error:
error APT2260: resource android:attr/lStar not found.
error APT2062: failed linking references.
Looking in the .aar yields META-INF\com\android\build\gradle\aar-metadata.properties:
aarFormatVersion=1.0
aarMetadataVersion=1.0
minCompileSdk=31
This means that moving forward, AndroidX.Core must target MonoAndroid12.0 (API-31). This has additional ramifications because API-31 requires JDK 11. Due to the release timing of Visual Studio, this means a user must have 16.11+ or 17.0+ installed.
Coincidentally, AndroidX.Core is a core part of the AndroidX dependency chain, and once it targets MonoAndroid12.0, pretty much every other package in AndroidX will have to target MonoAndroid12.0.
Thus, moving forward, we need to remove MonoAndroid9.0 from all AndroidX packages, and target MonoAndroid12.0 instead. This means that users will not be able to get newer AndroidX packages until they update their application to target API-31.
(This isn't quite as bad as it sounds, applications must already target a minimum of API-30 in order to be submitted into the Google Play Store. - source)
Unfortunately, we have already released MonoAndroid9.0 packages with AndroidX.Core 1.7 that we need to unwind because the newest packages that still contain MonoAndroid9.0 need to target AndroidX.Core 1.6.
Step 1:
- Unpublish latest round of AndroidX packages from NuGet
Step 2:
- Revert
package/nugetVersionversions inconfig.jsonto match NuGet. - Update template from
MonoAndroid9.0toMonoAndroid12.0 - Do patch version bump to all packages
- Release packages to NuGet
This will publish new NuGets that contain MonoAndroid12.0 but do not have any API changes from the currently published packages. This will allow our api-diff process to work on future stable updates.
Step 3:
- Resume stable updates as
MonoAndroid12.0/net6.0-android31only packages.
Unanswered question: if a user is still targeting MonoAndroid9.0 will the NuGet UI show the new packages that they can no longer use as available updates? Yes, see comment below