Coder Social home page Coder Social logo

Comments (3)

radekdoulik avatar radekdoulik commented on September 6, 2024

I am unable to reproduce it. Tried it with XA Version: 8.1.0.22

If it still happens for you, please attach whole XA project, which reproduces the issue.

from xamarin-android.

lorisgiglio avatar lorisgiglio commented on September 6, 2024

Hi, it's a big xamarin project with many references and I can't attach all the project.
I've same problem on Android 5.1 and Android 7.1 devices.

The problems seems to depend by dynamic method creation during NewtonSoft serialization but I don't know how it happens and why.

It happens in Release mode and not in Debug mode compilation. I saw that loaded assembly in debug mode are :

Loaded assembly: Microsoft.CSharp.dll [External]
Loaded assembly: System.ComponentModel.TypeConverter.dll [External]
Loaded assembly: Anonymously Hosted DynamicMethods Assembly [External]
Loaded assembly: System.Reflection.Primitives.dll [External]
Loaded assembly: System.Net.Http.dll [External]

My project can't compile in Release mode with Linking "SDK Assembly Only" but only with "NONE".

I attach all compile detailed debug information if it can help.
DEBUG_MODE.txt
RELEASE_MODE_LINKING_NONE.txt
RELEASE_MODE_LINKING_SDKASSEMBLYONLY.txt

from xamarin-android.

jonpryor avatar jonpryor commented on September 6, 2024

From RELEASE_MODE_LINKING_SDKASSEMBLYONLY.txt

error MSB4018: errore imprevisto dell'attivit‡ "LinkAssemblies".
error MSB4018: System.NullReferenceException: Riferimento a un oggetto non impostato su un'istanza di oggetto.
error MSB4018:    in Mono.Linker.TypeReferenceExtensions.<GetMethods>d__4.MoveNext()
error MSB4018:    in Mono.Linker.Steps.TypeMapStep.TryMatchMethod(TypeReference type, MethodDefinition method)
error MSB4018:    in Mono.Linker.Steps.TypeMapStep.GetBaseMethodInTypeHierarchy(TypeDefinition type, MethodDefinition method)
error MSB4018:    in Mono.Linker.Steps.TypeMapStep.MapVirtualMethods(TypeDefinition type)
error MSB4018:    in Mono.Linker.Steps.TypeMapStep.MapType(TypeDefinition type)
error MSB4018:    in Mono.Linker.Steps.TypeMapStep.ProcessAssembly(AssemblyDefinition assembly)
error MSB4018:    in Mono.Linker.Steps.BaseStep.Process(LinkContext context)
error MSB4018:    in Mono.Linker.Pipeline.Process(LinkContext context)
error MSB4018:    in MonoDroid.Tuner.Linker.Process(LinkerOptions options, LinkContext& context)
error MSB4018:    in Xamarin.Android.Tasks.LinkAssemblies.Execute(DirectoryAssemblyResolver res)
error MSB4018:    in Xamarin.Android.Tasks.LinkAssemblies.Execute()
error MSB4018:    in Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
error MSB4018:    in Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()

I suspect that you're hitting xamarin/xamarin-macios#3215, the fix for which involves a null check within TypeReferenceExtensions.GetMethods(), so I think that this is fixed in:

The fix has not yet been integrated on xamarin-android/master; the last URL above is on xamarin-android/d15-6, which is for Xamarin.Android 8.2 (currently in beta).

However, I don't know when that fix will actually be released.

from xamarin-android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.