Xamarin设计师Exception在visual studio 2015 for android

时间:2016-09-16 07:19:46

标签: xamarin visual-studio-2015 xamarin.android

您好! 我更改并保存文件* .axml,但设计器因错误而崩溃。 我重新安装了Visual Studio,SDK Ansroid,Xamarin,Windows 10,但是无法正常工作。我的系统绝对干净。

我的系统: Windows 10, Visual Studio 2015专业版(Update3), Xamarin版本4.2.0.680, Android SDK工具版本25.2.2, SDK平台Android 6.0,5.0.1,4.42, JDK 1.8

请帮帮我。

例外:

Xamarin.VisualStudio.TastyPackage Information: 0 : [2016-09-16 09:25:21.6275] Hooked up SDB tracing adapter
Xamarin.VisualStudio.TastyPackage Information: 0 : [2016-09-16 09:25:21.8140] Initialization finished
Xamarin.VisualStudio.Android.XamarinAndroidPackage Warning: 0 : [2016-09-16 09:25:22.0035] Initializing Xamarin.VisualStudio.Android.XamarinAndroidPackage
Xamarin.VisualStudio.ActivationManager Information: 0 : [2016-09-16 09:25:26.0092] Updated license: Android VSProfessional
Xamarin.VisualStudio.ActivationManager Information: 0 : [2016-09-16 09:25:26.2787] Updated license: iOS VSProfessional
Xamarin.VisualStudio.ActivationManager Information: 0 : [2016-09-16 09:25:40.9255] INFO: Changing layoutlib, from 0 to 23
Xamarin.VisualStudio.ActivationManager Information: 0 : [2016-09-16 09:25:41.3044] 
Xamarin.VisualStudio.ActivationManager Information: 0 : [2016-09-16 09:25:41.5261] INFO: Changing layoutlib, from 0 to 23
Xamarin.VisualStudio.ActivationManager Information: 0 : [2016-09-16 09:25:41.7399] 
Xamarin.VisualStudio.Android.MonoAndroidDesignerPane Error: 0 : [2016-09-16 09:25:48.3852] System.AggregateException: One or more errors occurred. ---> System.ArgumentException: The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))
   at EnvDTE.Document.Close(vsSaveChanges Save)
   at Xamarin.VisualStudio.Android.MonoAndroidDesignerPane.OpenViewCode() in C:\data\lanes\3513\c4382f51\source\xamarinvs\src\Core\VisualStudio.Android\Designer\MonoAndroidDesignerPane.cs:line 623
   at Xamarin.VisualStudio.Android.MonoAndroidDesignerPane.<OpenViewCodeAsync>b__66_0() in C:\data\lanes\3513\c4382f51\source\xamarinvs\src\Core\VisualStudio.Android\Designer\MonoAndroidDesignerPane.cs:line 612
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
   --- End of inner exception stack trace ---
---> (Inner Exception #0) System.ArgumentException: The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))
   at EnvDTE.Document.Close(vsSaveChanges Save)
   at Xamarin.VisualStudio.Android.MonoAndroidDesignerPane.OpenViewCode() in C:\data\lanes\3513\c4382f51\source\xamarinvs\src\Core\VisualStudio.Android\Designer\MonoAndroidDesignerPane.cs:line 623
   at Xamarin.VisualStudio.Android.MonoAndroidDesignerPane.<OpenViewCodeAsync>b__66_0() in C:\data\lanes\3513\c4382f51\source\xamarinvs\src\Core\VisualStudio.Android\Designer\MonoAndroidDesignerPane.cs:line 612
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()<---

Xamarin.VisualStudio.ActivationManager Information: 0 : [2016-09-16 09:25:49.4008] INFO: Changing layoutlib, from 0 to 23
Xamarin.VisualStudio.ActivationManager Information: 0 : [2016-09-16 09:25:49.7591] 
Xamarin.VisualStudio.ActivationManager Information: 0 : [2016-09-16 09:25:50.1029] INFO: Changing layoutlib, from 0 to 23
Xamarin.VisualStudio.ActivationManager Information: 0 : [2016-09-16 09:25:50.4310] 
Xamarin.VisualStudio.Android.MonoAndroidDesignerPane Error: 0 : [2016-09-16 09:25:54.5138] System.AggregateException: One or more errors occurred. ---> System.ArgumentException: The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))
   at EnvDTE.Document.Close(vsSaveChanges Save)
   at Xamarin.VisualStudio.Android.MonoAndroidDesignerPane.OpenViewCode() in C:\data\lanes\3513\c4382f51\source\xamarinvs\src\Core\VisualStudio.Android\Designer\MonoAndroidDesignerPane.cs:line 623
   at Xamarin.VisualStudio.Android.MonoAndroidDesignerPane.<OpenViewCodeAsync>b__66_0() in C:\data\lanes\3513\c4382f51\source\xamarinvs\src\Core\VisualStudio.Android\Designer\MonoAndroidDesignerPane.cs:line 612
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
   --- End of inner exception stack trace ---
---> (Inner Exception #0) System.ArgumentException: The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))
   at EnvDTE.Document.Close(vsSaveChanges Save)
   at Xamarin.VisualStudio.Android.MonoAndroidDesignerPane.OpenViewCode() in C:\data\lanes\3513\c4382f51\source\xamarinvs\src\Core\VisualStudio.Android\Designer\MonoAndroidDesignerPane.cs:line 623
   at Xamarin.VisualStudio.Android.MonoAndroidDesignerPane.<OpenViewCodeAsync>b__66_0() in C:\data\lanes\3513\c4382f51\source\xamarinvs\src\Core\VisualStudio.Android\Designer\MonoAndroidDesignerPane.cs:line 612
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()<---

Xamarin.VisualStudio.ActivationManager Information: 0 : [2016-09-16 09:25:55.3556] INFO: Changing layoutlib, from 0 to 23
Xamarin.VisualStudio.ActivationManager Information: 0 : [2016-09-16 09:25:55.6798] 
Xamarin.VisualStudio.ActivationManager Information: 0 : [2016-09-16 09:25:56.1944] INFO: Changing layoutlib, from 0 to 23
Xamarin.VisualStudio.ActivationManager Information: 0 : [2016-09-16 09:25:56.5547] 
Xamarin.VisualStudio.Android.MonoAndroidDesignerPane Error: 0 : [2016-09-16 09:35:28.4616] System.AggregateException: One or more errors occurred. ---> System.ArgumentException: The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))
   at EnvDTE.Document.Close(vsSaveChanges Save)
   at Xamarin.VisualStudio.Android.MonoAndroidDesignerPane.OpenViewCode() in C:\data\lanes\3513\c4382f51\source\xamarinvs\src\Core\VisualStudio.Android\Designer\MonoAndroidDesignerPane.cs:line 623
   at Xamarin.VisualStudio.Android.MonoAndroidDesignerPane.<OpenViewCodeAsync>b__66_0() in C:\data\lanes\3513\c4382f51\source\xamarinvs\src\Core\VisualStudio.Android\Designer\MonoAndroidDesignerPane.cs:line 612
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
   --- End of inner exception stack trace ---
---> (Inner Exception #0) System.ArgumentException: The parameter is incorrect. Exception from HRESULT: 0x80070057 (E_INVALIDARG))
   at EnvDTE.Document.Close(vsSaveChanges Save)
   at Xamarin.VisualStudio.Android.MonoAndroidDesignerPane.OpenViewCode() in C:\data\lanes\3513\c4382f51\source\xamarinvs\src\Core\VisualStudio.Android\Designer\MonoAndroidDesignerPane.cs:line 623
   at Xamarin.VisualStudio.Android.MonoAndroidDesignerPane.<OpenViewCodeAsync>b__66_0() in C:\data\lanes\3513\c4382f51\source\xamarinvs\src\Core\VisualStudio.Android\Designer\MonoAndroidDesignerPane.cs:line 612
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()<---

Xamarin.VisualStudio.ActivationManager Information: 0 : [2016-09-16 09:35:29.2194] INFO: Changing layoutlib, from 0 to 23
Xamarin.VisualStudio.ActivationManager Information: 0 : [2016-09-16 09:35:29.5710] 
Xamarin.VisualStudio.ActivationManager Information: 0 : [2016-09-16 09:35:30.3170] INFO: Changing layoutlib, from 0 to 23
Xamarin.VisualStudio.ActivationManager Information: 0 : [2016-09-16 09:35:30.6881] 

1 个答案:

答案 0 :(得分:0)

可能是需要JDK 8 64位的最新Xamarin Android Designer的问题。请参阅此处的发行说明: https://developer.xamarin.com/releases/android/xamarin.android_7/xamarin.android_7.0/

相关文字:

  

注意:Xamarin.Android 7.0要求JDK 1.8使用Android Nougat(API 24)API。如果定位早期的Android API级别,您可以继续使用早期版本的JDK:

     

JDK 1.8 - 最高为API 24 +

     

JDK 1.7 - 符合API 23

     

JDK 1.6 - 最多API 20

     

此外,使用custom controls in the Android designer.

需要64位版本的JDK      

最简单的选择是安装64位版本的JDK 1.8,因为它向后兼容所有以前的API级别,并支持新的Android设计器功能。

     

(JDK 1.8的一个不幸的复杂情况是与Android SDK中包含的过时版本的Proguard不兼容。目前,当尝试使用Proguard时,这将导致错误“不支持的类版本号[52.0]”或Xamarin.Android中的Multidex功能。请参阅44187。)