Skip to content

Improve AndroidMavenLibrary dependency resolution error messaging #9706

Open
@pjcollins

Description

Android framework version

net9.0-android

Affected platform version

.NET 9

Description

The AndroidMavenLibrary library and dependency resolution that happens in <MavenDownload/> can fail and produce less than ideal error messaging. It would be great if we could improve the logging to report which (if any) dependencies can be resolved, and which ones fail.

In the case of com.revenuecat.purchases:purchases-ui described below it seems that this library itself can be resolved, but somewhere along the way we encounter an error that is not actionable:

/usr/local/share/dotnet/packs/Microsoft.Android.Sdk.Darwin/35.0.24/tools/Xamarin.Android.Bindings.Maven.targets(28,5): error XA4237: Cannot download POM file for Maven artifact 'com.revenuecat.purchases:purchases-ui:8.11.0'. 
/usr/local/share/dotnet/packs/Microsoft.Android.Sdk.Darwin/35.0.24/tools/Xamarin.Android.Bindings.Maven.targets(28,5): error XA4237: - Response status code does not indicate success: 404 (Not Found).

Steps to Reproduce

  1. dotnet new android
  2. Update the .csproj to include the following and build it:
<ItemGroup>
  <AndroidMavenLibrary Include="com.revenuecat.purchases:purchases-ui" Version="8.11.0" Bind="false" />
</ItemGroup>

Did you find any workaround?

I can work around this by setting the VerifyDependencies metadata to false, however this also suppresses messaging about the dependencies of this library:

<ItemGroup>
  <AndroidMavenLibrary Include="com.revenuecat.purchases:purchases-ui" Version="8.11.0" Bind="false" VerifyDependencies="false" />
</ItemGroup>

Metadata

Labels

Area: App+Library BuildIssues when building Library projects or Application projects.

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions