question

ramgopal avatar image
0 Votes"
ramgopal asked LeonLu-MSFT commented

After Migrate Androd X , Application is showing spalsh screen and crasing , It is not hitting Main activity.

ystem.InvalidCastException: Unable to cast object of type 'Mono.Debugger.Soft.PointerValue' to type 'Mono.Debugger.Soft.PrimitiveValue'.
at Mono.Debugging.Soft.SoftDebuggerAdaptor.TargetObjectToObject(EvaluationContext ctx, Object obj) in C:\A\1\57\s\external\debugger-libs\Mono.Debugging.Soft\SoftDebuggerAdaptor.cs:line 2673
at Mono.Debugging.Evaluation.ExpressionEvaluator.TargetObjectToExpression(EvaluationContext ctx, Object obj) in C:\A\1\57\s\external\debugger-libs\Mono.Debugging\Mono.Debugging.Evaluation\ExpressionEvaluator.cs:line 87
at Mono.Debugging.Evaluation.ObjectValueAdaptor.CreateObjectValueImpl(EvaluationContext ctx, IObjectValueSource source, ObjectPath path, Object obj, ObjectValueFlags flags) in C:\A\1\57\s\external\debugger-libs\Mono.Debugging\Mono.Debugging.Evaluation\ObjectValueAdaptor.cs:line 474
at Mono.Debugging.Soft.SoftDebuggerAdaptor.CreateObjectValueImpl(EvaluationContext ctx, IObjectValueSource source, ObjectPath path, Object obj, ObjectValueFlags flags) in C:\A\1\57\s\external\debugger-libs\Mono.Debugging.Soft\SoftDebuggerAdaptor.cs:line 1545
at Mono.Debugging.Evaluation.ObjectValueAdaptor.CreateObjectValue(EvaluationContext ctx, IObjectValueSource source, ObjectPath path, Object obj, ObjectValueFlags flags) in C:\A\1\57\s\external\debugger-libs\Mono.Debugging\Mono.Debugging.Evaluation\ObjectValueAdaptor.cs:line 96
System.InvalidCastException: Unable to cast object of type 'Mono.Debugger.Soft.PointerValue' to type 'Mono.Debugger.Soft.PrimitiveValue'.
at Mono.Debugging.Soft.SoftDebuggerAdaptor.TargetObjectToObject(EvaluationContext ctx, Object obj) in C:\A\1\57\s\external\debugger-libs\Mono.Debugging.Soft\SoftDebuggerAdaptor.cs:line 2673
at Mono.Debugging.Evaluation.ExpressionEvaluator.TargetObjectToExpression(EvaluationContext ctx, Object obj) in C:\A\1\57\s\external\debugger-libs\Mono.Debugging\Mono.Debugging.Evaluation\ExpressionEvaluator.cs:line 87
at Mono.Debugging.Evaluation.ObjectValueAdaptor.CreateObjectValueImpl(EvaluationContext ctx, IObjectValueSource source, ObjectPath path, Object obj, ObjectValueFlags flags) in C:\A\1\57\s\external\debugger-libs\Mono.Debugging\Mono.Debugging.Evaluation\ObjectValueAdaptor.cs:line 474
at Mono.Debugging.Soft.SoftDebuggerAdaptor.CreateObjectValueImpl(EvaluationContext ctx, IObjectValueSource source, ObjectPath path, Object obj, ObjectValueFlags flags) in C:\A\1\57\s\external\debugger-libs\Mono.Debugging.Soft\SoftDebuggerAdaptor.cs:line 1545
at Mono.Debugging.Evaluation.ObjectValueAdaptor.CreateObjectValue(EvaluationContext ctx, IObjectValueSource source, ObjectPath path, Object obj, ObjectValueFlags flags) in C:\A\1\57\s\external\debugger-libs\Mono.Debugging\Mono.Debugging.Evaluation\ObjectValueAdaptor.cs:line 96
System.InvalidCastException: Unable to cast object of type 'Mono.Debugger.Soft.PointerValue' to type 'Mono.Debugger.Soft.PrimitiveValue'.
at Mono.Debugging.Soft.SoftDebuggerAdaptor.TargetObjectToObject(EvaluationContext ctx, Object obj) in C:\A\1\57\s\external\debugger-libs\Mono.Debugging.Soft\SoftDebuggerAdaptor.cs:line 2673
at Mono.Debugging.Evaluation.ExpressionEvaluator.TargetObjectToExpression(EvaluationContext ctx, Object obj) in C:\A\1\57\s\external\debugger-libs\Mono.Debugging\Mono.Debugging.Evaluation\ExpressionEvaluator.cs:line 87
at Mono.Debugging.Evaluation.ObjectValueAdaptor.CreateObjectValueImpl(EvaluationContext ctx, IObjectValueSource source, ObjectPath path, Object obj, ObjectValueFlags flags) in C:\A\1\57\s\external\debugger-libs\Mono.Debugging\Mono.Debugging.Evaluation\ObjectValueAdaptor.cs:line 474
at Mono.Debugging.Soft.SoftDebuggerAdaptor.CreateObjectValueImpl(EvaluationContext ctx, IObjectValueSource source, ObjectPath path, Object obj, ObjectValueFlags flags) in C:\A\1\57\s\external\debugger-libs\Mono.Debugging.Soft\SoftDebuggerAdaptor.cs:line 1545
at Mono.Debugging.Evaluation.ObjectValueAdaptor.CreateObjectValue(EvaluationContext ctx, IObjectValueSource source, ObjectPath path, Object obj, ObjectValueFlags flags) in C:\A\1\57\s\external\debugger-libs\Mono.Debugging\Mono.Debugging.Evaluation\ObjectValueAdaptor.cs:line 96
[HotReload] (2021-03-02 19:03:26.7): WARN: (UandUST.Android) Unknown Breakpoint Hit: Android.Runtime.JNIEnv.RegisterJniNatives( typeName_ptr, int typeName_len, jniClass, methods_ptr, int methods_len)
03-02 19:04:29.549 D/Mono ( 8988): Image addref Xamarin.HotReload.Agent[0x7e0b510e80] (asmctx INDIVIDIUAL) -> data-0x7dff07a080[0x7dff041000]: 3
03-02 19:04:29.549 D/Mono ( 8988): Prepared to set up assembly 'Xamarin.HotReload.Agent' (data-0x7dff07a080)
03-02 19:04:29.549 D/Mono ( 8988): Assembly Xamarin.HotReload.Agent[0x7e0b510e80] added to domain RootDomain, ref_count=1
Loaded assembly: data-0x7dff07a080 [External]

dotnet-xamarin
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Please update your xamarin.forms nuget package version to the 5.0 or later and keep the target Android API version 29 or greater.

0 Votes 0 ·

I have updated latest Xamarin forms version and updated all the existing packages. Target android API 29 , Still I am getting same issue. While debugging time app is crashing . Same error I am getting. If I open app without debug app is showing white screen itself nothing happening.
Note: If revert back Android X it is working but I am not able to update Xamarin Essential.

If you have any idea please send me the steps to resolve the issue

0 Votes 0 ·

If you use android 10, try to enable AndroidX migrator.

82363-image.png


0 Votes 0 ·
image.png (40.4 KiB)

0 Answers