You need to add a reference to Mono.Android.Export.Dll when you use ExportAttribute or ExportFieldAttribute
My code works fine, but when I added fragments with a new namespace to the project, I began getting the error
You need to add a reference to Mono.Android.Export.Dll when you use ExportAttribute or ExportFieldAttribute
I've searched online and found several mentions of unlinking assemblies, but I've also read that this will cause additional errors.
Does anyone know how to solve this bug?
I found the answer. Right click references and search Export. Just add the Mono.Android.Export to your project.
I added reference like @Jeremy Said, it's working
If you're using JetBrains Rider, you can solve the issue by adding the Mono.Android.Export
reference to your Android .csproj
file:
<!-- ExampleApp.Android.csproj -->
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
...
<ItemGroup>
<Reference Include="Mono.Android" />
<Reference Include="Mono.Android.Export" />
</ItemGroup>
...
</Project>