Skip to content

.aar file missing from NuGet package for .net6-android binding #7040

@VincentUhlmann

Description

@VincentUhlmann

Android application type

Android for .NET (net6.0-android, etc.)

Affected platform version

.NET6-Android

Description

Hey, I am currently facing a problem with a .net6-android binding project. Generally the binding works as long as I add the binding project as reference to e.g. a MAUI app. However, as soon as I make a NuGet package from the binding and use it, I get errors like "JAVAC0000 error: package com.foo.foo does not exist". I have now spent several hours trying to solve the problem, and for example analyzed the NuGet packages with dotPeek. I am now at the point where I have determined that the .aar file to bind does not exist in the NuGet packet. If I compare .net6-android NuGet package with e.g. MonoAndroid, I see that under .net6 no resources folder exists. If I have recognized it correctly, the .aar file should be included in the DLL. I have tried all possible things to solve the error by changing the .csproj of the binding project. I have also taken into account the information that is available here, e.g. "https://github.com/xamarin/xamarin-android/blob/main/Documentation/guides/OneDotNet.md". I can't pinpoint the problem, but I hope someone has an idea how to solve it.

Steps to Reproduce

  1. Create a .net6 android binding project.
  2. Bind an .aar file
  3. Create a NuGet package from the binding project
  4. Try to consume the NuGet package

Did you find any workaround?

No response

Relevant log output

No response

Metadata

Metadata

Assignees

Labels

needs-triageIssues that need to be assigned.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions