Forum Xamarin Cross Platform with Xamarin

Getting "Found conflicts between different versions of "System.Numerics.Vectors" that could not be"

I am trying to create release build archive.
I am getting this error when i set linker behaviour to "Link sdk assemblies only" or "Link all assemblies".
below is error i am getting.

Found conflicts between different versions of "System.Numerics.Vectors" that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed.
**
But when i set **linker behaviour
to "** "Don't Link" it allows me create apk.

I am attaching screenshots for android setting.

Also I am getting apk of size like 430mb. How can i decrease size of apk?
I am already using code shrinker "r8" and dex compiler "d8" as you can see in screenshots.

These are nudgets being used.

Answers

  • jezhjezh Member, Xamarin Team Xamurai
    edited August 28

    Also I am getting apk of size like 430mb. How can i decrease size of apk?

    For this, we usually Configure the Linker to reduce the size of app.

    In Release mode, VS turns off the shared runtime and turns on linking so that the application only ships the pieces of Xamarin.Android required at runtime. The linker in Xamarin.Android uses static analysis to determine which assemblies, types, and type members are used or referenced by a Xamarin.Android application. The linker then discards all the unused assemblies, types, and members that are not used (or referenced).So this can result in a significant reduction in the package size.

    Found conflicts between different versions of "System.Numerics.Vectors" that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed.

    For this question, could you please post a basic demo so that we can test on our side?

  • hadwanihardikhadwanihardik Member ✭✭

    **For this, we usually Configure the Linker to reduce the size of app.
    **

    I am getting error when i set linker behaviour to "Link sdk assemblies only" or "Link all assemblies".

  • jezhjezh Member, Xamarin Team Xamurai

    Could you please post a basic demo so that we can test on our side?

  • hadwanihardikhadwanihardik Member ✭✭

    All Done. Now issues is with apk size. apk size getting 200mb. please suggest ways to improve size

  • jezhjezh Member, Xamarin Team Xamurai

    Congrats, how did you solve the problem?

    Could you please share you answer so that it will help others who have similar questions? Thanks in advance. :)

  • hadwanihardikhadwanihardik Member ✭✭

    it was just warning.

Sign In or Register to comment.