Xamarin Android应用在发布模式下启动时崩溃在调试模式下可以正常工作

时间:2019-01-07 12:37:36

标签: android xamarin xamarin.forms xamarin.android

Xamarin Android应用程序在首次启动后在发布模式下崩溃,并且可以在调试模式下完美运行。 我禁用了progaurd,共享的运行时选项,并将“ link sdks”更改为“ None”。添加了所有必需的体系结构。请查找问题的日志。

Android app options screenshot

 Xamarin caused by: android.runtime.JavaProxyThrowable: System.AggregateException: One or more errors occurred. ---> System.TypeLoadException: Could not resolve type with token 010000b4 from typeref (expected class 'System.Xml.XmlDictionaryReader' in assembly 'Xamarin.Android.Support.v4, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null')
System.Threading.Tasks.Task<TResult>.InnerInvoke()<d4a23bbd2f544c30a48c44dd622ce09f>:0
System.Threading.Tasks.Task.Execute()<d4a23bbd2f544c30a48c44dd622ce09f>:0
Xamarin.Forms.Application.<GetPropertiesAsync>d__60.MoveNext()<d9bc55848bcb4df0a2fb5a602398b130>:0
--- End of inner exception stack trace ---
System.Threading.Tasks.Task.ThrowIfExceptional(bool includeTaskCanceledExceptions)<d4a23bbd2f544c30a48c44dd622ce09f>:0
System.Threading.Tasks.Task<TResult>.GetResultCore(bool waitCompletionNotification)<d4a23bbd2f544c30a48c44dd622ce09f>:0
System.Threading.Tasks.Task<TResult>.get_Result()<d4a23bbd2f544c30a48c44dd622ce09f>:0
Xamarin.Forms.Application.get_Properties()<d9bc55848bcb4df0a2fb5a602398b130>:0
Xamarin.Forms.Application.<SetPropertiesAsync>d__66.MoveNext()<d9bc55848bcb4df0a2fb5a602398b130>:0
Xamarin.Forms.Application.<SavePropertiesAsync>d__46.MoveNext()<d9bc55848bcb4df0a2fb5a602398b130>:0
Xamarin.Forms.Platform.Android.FormsAppCompatActivity.<OnStateChanged>d__39.MoveNext()<f839f54bae5d4fa09455747fadfaf940>:0
Android.App.SyncContext.<>c__DisplayClass2_0.<Post>b__0()<bb8f3789d62b420bb7b0ae22e1ff3c26>:0
Java.Lang.Thread.RunnableImplementor.Run()<bb8f3789d62b420bb7b0ae22e1ff3c26>:0
Java.Lang.IRunnableInvoker.n_Run(IntPtr jnienv, IntPtr native__this)<bb8f3789d62b420bb7b0ae22e1ff3c26>:0
at (wrapper dynamic-method) System.Object.43(intptr,intptr)
---> (Inner Exception #0) System.TypeLoadException: Could not resolve type with token 010000b4 from typeref (expected class 'System.Xml.XmlDictionaryReader' in assembly 'Xamarin.Android.Support.v4, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null')
System.Threading.Tasks.Task<TResult>.InnerInvoke()<d4a23bbd2f544c30a48c44dd622ce09f>:0
System.Threading.Tasks.Task.Execute()<d4a23bbd2f544c30a48c44dd622ce09f>:0
Xamarin.Forms.Application.<GetPropertiesAsync>d__60.MoveNext()<d9bc55848bcb4df0a2fb5a602398b130>:0
mono.java.lang.RunnableImplementor.n_run(Native Method)
mono.java.lang.RunnableImplementor.run()RunnableImplementor.java:30
android.os.Handler.handleCallback()Handler.java:739
android.os.Handler.dispatchMessage()Handler.java:95
android.os.Looper.loop()Looper.java:135
android.app.ActivityThread.main()ActivityThread.java:5221
java.lang.reflect.Method.invoke(Native Method)
java.lang.reflect.Method.invoke()Method.java:372
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run()ZygoteInit.java:898
com.android.internal.os.ZygoteInit.main()ZygoteInit.java:693

0 个答案:

没有答案
相关问题