Skip to content
This repository has been archived by the owner on Nov 6, 2024. It is now read-only.

Error building Xamarin Android project in Release Mode. #867

Open
pro777s opened this issue May 8, 2024 · 5 comments
Open

Error building Xamarin Android project in Release Mode. #867

pro777s opened this issue May 8, 2024 · 5 comments

Comments

@pro777s
Copy link

pro777s commented May 8, 2024

Xamarin.Android Version (eg: 6.0):

17.9.3

Operating System & Version (eg: Mac OSX 10.11):

Windows 11 23H2

Google Play Services Version

  • [] GPS-FB with AndroidX dependencies (versions 1xx.yyyy.zz)

  • [] GPS-FB with Android.Support (legacy) dependencies (versions 71.yyyy.zz)

Describe your Issue

Error issued only in release mode on building Xamarin Android project.

Relevant information

Add relevant project settings from *.csproj file:

Packages used:

    <PackageReference Include="Xamarin.AndroidX.AppCompat" Version="1.6.1.7" />
    <PackageReference Include="Xamarin.Google.Android.Material" Version="1.0.0.1" />
    <PackageReference Include="Xamarin.Essentials" Version="1.6.1" />

Build settings (tools)

    <AndroidDexTool>d8</AndroidDexTool>
    <AndroidLinkTool>r8</AndroidLinkTool>
    <AndroidUseAapt2>true</AndroidUseAapt2>
    <AndroidEnableDesugar>true</AndroidEnableDesugar>

or even better - links to the existing code:

NOTE: Please DO NOT submit screenshot images. Images are not searchable!

Minimal Repro Code Sample

If you want to speed up investigation and bug fixing: please provide minimal repro sample for tests.

Steps to Reproduce (with link to sample solution if possible):

Include any relevant Exception Stack traces, build logs, adb logs:

\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Xamarin\Android\Xamarin.Android.Legacy.targets(649,5): error XALNK7000: Mono.Linker.MarkException: Error processing method: 'Xamarin.Coil.Decode.IDecoder Xamarin.Coil.Util._ComponentRegistries::RequireDecoder(Xamarin.Coil.ComponentRegistry,Java.Lang.Object,Square.OkIO.IBufferedSource,System.String)' in assembly: 'Xamarin.CoilBase.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve Square.OkIO.IBufferedSource
@pro777s
Copy link
Author

pro777s commented May 8, 2024

Xamarin.Android Version 13.2.2.0 and MS VC 17.9.3

@pro777s
Copy link
Author

pro777s commented May 8, 2024

After I build the project with the "No Linking" linker option, the project was build successfully. Then I set the linker option back to “Build packages of SDK and user ”, the project was also successfully assembled. We will consider the error corrected.

@moljac
Copy link
Member

moljac commented May 15, 2024

@pro777s

Thanks for the feedback.

This smells like linker issue, but there are few issues with libraries packages used

I am afraid we will not be able to help you out.

You should migrate your app to MAUI.

@v-hogood
Copy link

v-hogood commented Sep 3, 2024

Could we get Xamarin.Coil.* updated? Looks like the latest version is 2.7.0:

https://central.sonatype.com/artifact/io.coil-kt/coil

Thanks!

@jpobst
Copy link
Contributor

jpobst commented Sep 23, 2024

We no longer maintain that package and do not produce updates for it:
xamarin/XamarinComponents#1418

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants