Comments (3)
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.
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.
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:
- dotnet/linker@c62335c (actual fix)
- mono/mono@3c3e692 (integrate above fix into mono)
- a82c286 (integrate mono fix into xamarin-android)
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)
- Error APT2260 after upgrading to .NET 8 Android HOT 3
- Android app crashed on startup with Release build, but works well in Debug build with AOT enabled.
- Getting a "failed linking references" error when running an Android Project (Xamarin - Visual Studio 2022) HOT 3
- Support for Play Store "Native Crash Support" HOT 2
- Crash: `[libc] Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR)` HOT 5
- Error dotnet reactor code obfuscation HOT 1
- Failed to generate Java type for class HOT 3
- [net9-pre3] Enabling ILLink causes the build to fail on Application attribute HOT 4
- Cannot add System.Json to an Android .NET 8 project HOT 2
- Missing documentation on recommended release settings. D8andR8.md is likely outdated HOT 3
- Error out when building android template app with RunAOTCompilation and logging enabled HOT 5
- Error APT2260 when reference to Binding project HOT 6
- GenerateJavaStubs takes a long time when building incrementally for a maui project HOT 2
- how to use c++ dll in .net android (or MAUI android)? HOT 2
- Xamarin.Android.Aapt2.targets(123,3): error APT2144 com.stripe:stripe-android:20.40.4 HOT 12
- HttpClient and AcceptEncoding gzip on Android stoped working after latest SR4 release. HOT 17
- Unable to turn off Fast Deployment for .Net8 Maui Android project HOT 6
- [Question] A way to connect Mono Debugger for the Release builds
- Trimming still seems to break android push notifications on MAUI .net 9 preview 3 HOT 2
- `TrimMode=full` seems to break android push notifications on MAUI .net 9 preview 3 HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xamarin-android.