Repository navigation
Closed
Labels
Area: App+Library BuildIssues when building Library projects or Application projects.
Milestone
Description
Android framework version
net9.0-android
Affected platform version
17.14.10
Description
1>C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\35.0.78\tools\Xamarin.Android.Bindings.JavaDependencyVerification.targets(27,5): error XAJDV7004: System.ArgumentException: Value cannot be null or an empty string.
1>C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\35.0.78\tools\Xamarin.Android.Bindings.JavaDependencyVerification.targets(27,5): error XAJDV7004: Parameter name: value
1>C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\35.0.78\tools\Xamarin.Android.Bindings.JavaDependencyVerification.targets(27,5): error XAJDV7004: at NuGet.Versioning.NuGetVersion.Parse(String value)
1>C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\35.0.78\tools\Xamarin.Android.Bindings.JavaDependencyVerification.targets(27,5): error XAJDV7004: at Xamarin.Android.Tasks.NuGetPackageVersionFinder.GetArtifactsInNugetPackage(String library, String version, TaskLoggingHelper log) in /Users/runner/work/1/s/xamarin-android/src/Xamarin.Android.Build.Tasks/Tasks/JavaDependencyVerification.cs:line 375
1>C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\35.0.78\tools\Xamarin.Android.Bindings.JavaDependencyVerification.targets(27,5): error XAJDV7004: at Xamarin.Android.Tasks.DependencyResolver.AddPackageReferences(ITaskItem[] tasks) in /Users/runner/work/1/s/xamarin-android/src/Xamarin.Android.Build.Tasks/Tasks/JavaDependencyVerification.cs:line 164
1>C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\35.0.78\tools\Xamarin.Android.Bindings.JavaDependencyVerification.targets(27,5): error XAJDV7004: at Xamarin.Android.Tasks.JavaDependencyVerification.RunTask() in /Users/runner/work/1/s/xamarin-android/src/Xamarin.Android.Build.Tasks/Tasks/JavaDependencyVerification.cs:line 77
1>C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\35.0.78\tools\Xamarin.Android.Bindings.JavaDependencyVerification.targets(27,5): error XAJDV7004: at Microsoft.Android.Build.Tasks.AndroidTask.Execute() in /Users/runner/work/1/s/xamarin-android/external/xamarin-android-tools/src/Microsoft.Android.Build.BaseTasks/AndroidTask.cs:line 25
1>Done building project "PdfViewer.csproj" -- FAILED.
Steps to Reproduce
New Android project:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0-android</TargetFramework>
<SupportedOSPlatformVersion>26</SupportedOSPlatformVersion>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<IsTrimmable>true</IsTrimmable>
</PropertyGroup>
<ItemGroup>
<AndroidMavenLibrary Include="com.github.bhuvaneshw.pdfviewer:ui" Version="1.1.1" Repository="https://jitpack.io/" />
</ItemGroup>
</Project>
Same issue when using:
<AndroidLibrary
Update="ui-1.1.1.aar"
Manifest="ui-1.1.1.pom"
JavaArtifact="com.github.bhuvaneshw.pdfviewer:ui:1.1.1"
JavaVersion="1.1.1" />
Did you find any workaround?
No response
Relevant log output
Metadata
Metadata
Assignees
Labels
Area: App+Library BuildIssues when building Library projects or Application projects.
Activity
jonathanpeppers commentedon Jul 30, 2025
I tried
dotnet new androidliband added the package:But I get errors with missing dependencies:
Do you have a sample project that resolves the missing dependencies?
Some of them could be fixed by adding
<PackageReference/>as the error mentions.rgroenewoudt commentedon Jul 31, 2025
Most of the time I don't get the missing dependencies message, just the ArgumentException. (randomly cleaning & rebuilding and sometimes the missing dependencies message shows)
Same situation for
dotnet build. It's difficult to fix the missing dependencies if I don't the message about missing them...rgroenewoudt commentedon Jul 31, 2025
Ah, if Central Package Management is enabled for the solution the ArgumentException shows up.
Without CPM I don't have any issues
jonathanpeppers commentedon Jul 31, 2025
@rgroenewoudt can you share an example project?
There might be a general bug with CPM +
AndroidMavenLibraryitem group.rgroenewoudt commentedon Aug 4, 2025
@jonathanpeppers AndroidBinding1.zip
[Build.Tasks] Resolve centrally managed NuGet package versions (#13533)