我的笔记本电脑死了,所以我将代码恢复到了桌面上。我将Xamarin用于VS2017。编译时出现“ java退出,代码为1”错误,日志包含以下内容:
Xamarin.VisualStudio.TastyPackage|Information|0|Hooked up SDB tracing adapter
Xamarin.VisualStudio.TastyPackage|Information|0|Initialization finished
Xamarin|Information|0|Xamarin - 4.12.3.83-d15-9+23fa80172
Xamarin.VisualStudio.TastyPackage|Information|0|Hooked up SDB tracing adapter
Xamarin.VisualStudio.TastyPackage|Information|0|Initialization finished
Xamarin.VisualStudio.Android.XamarinAndroidPackage|Warning|0|Initializing Xamarin.VisualStudio.Android.XamarinAndroidPackage
Xamarin.VisualStudio.DocumentObservable|Warning|0|An error occurred getting the Project Node for 'C:\Users\HP_administrator\Documents\Visual Studio 2017\Projects\OML Android\OML Android\OML Android.csproj'
System.InvalidCastException: Unable to cast COM object of type 'EnvDTE.SolutionClass' to interface type 'EnvDTE.Project'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{866311E6-C887-4143-9833-645F5B93F6F1}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
at Microsoft.VisualStudio.Shell.Interop.VsShellExtensions.ToDteProject(IVsHierarchy hierarchy) in E:\A\_work\1824\s\src\Core\Xamarin.VisualStudio.Interfaces\Extensions\VsShellExtensions.cs:line 233
at Xamarin.VisualStudio.DocumentObservable.OnBeforeDocumentWindowShow(UInt32 docCookie, Int32 fFirstShow, IVsWindowFrame pFrame) in E:\A\_work\1824\s\src\Core\VisualStudio\DocumentObservable.cs:line 33
Xamarin.VisualStudio.DocumentObservable|Warning|0|An error occurred getting the Project Node for 'C:\Users\HP_administrator\Documents\Visual Studio 2017\Projects\OML Android\OML Android\OML Android.csproj'
System.InvalidCastException: Unable to cast COM object of type 'EnvDTE.SolutionClass' to interface type 'EnvDTE.Project'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{866311E6-C887-4143-9833-645F5B93F6F1}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
at Microsoft.VisualStudio.Shell.Interop.VsShellExtensions.ToDteProject(IVsHierarchy hierarchy) in E:\A\_work\1824\s\src\Core\Xamarin.VisualStudio.Interfaces\Extensions\VsShellExtensions.cs:line 233
at Xamarin.VisualStudio.DocumentObservable.OnBeforeDocumentWindowShow(UInt32 docCookie, Int32 fFirstShow, IVsWindowFrame pFrame) in E:\A\_work\1824\s\src\Core\VisualStudio\DocumentObservable.cs:line 33
Xamarin.VisualStudio.DocumentObservable|Warning|0|An error occurred getting the Project Node for 'C:\Users\HP_administrator\Documents\Visual Studio 2017\Projects\OML Android\OML Android\OML Android.csproj'
System.InvalidCastException: Unable to cast COM object of type 'EnvDTE.SolutionClass' to interface type 'EnvDTE.Project'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{866311E6-C887-4143-9833-645F5B93F6F1}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
at Microsoft.VisualStudio.Shell.Interop.VsShellExtensions.ToDteProject(IVsHierarchy hierarchy) in E:\A\_work\1824\s\src\Core\Xamarin.VisualStudio.Interfaces\Extensions\VsShellExtensions.cs:line 233
at Xamarin.VisualStudio.DocumentObservable.OnBeforeDocumentWindowShow(UInt32 docCookie, Int32 fFirstShow, IVsWindowFrame pFrame) in E:\A\_work\1824\s\src\Core\VisualStudio\DocumentObservable.cs:line 33
Xamarin.VisualStudio.DocumentObservable|Warning|0|An error occurred getting the Project Node for 'C:\Users\HP_administrator\Documents\Visual Studio 2017\Projects\OML Android\OML Android\OML Android.csproj'
System.InvalidCastException: Unable to cast COM object of type 'EnvDTE.SolutionClass' to interface type 'EnvDTE.Project'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{866311E6-C887-4143-9833-645F5B93F6F1}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
at Microsoft.VisualStudio.Shell.Interop.VsShellExtensions.ToDteProject(IVsHierarchy hierarchy) in E:\A\_work\1824\s\src\Core\Xamarin.VisualStudio.Interfaces\Extensions\VsShellExtensions.cs:line 233
at Xamarin.VisualStudio.DocumentObservable.OnBeforeDocumentWindowShow(UInt32 docCookie, Int32 fFirstShow, IVsWindowFrame pFrame) in E:\A\_work\1824\s\src\Core\VisualStudio\DocumentObservable.cs:line 33
Xamarin.VisualStudio.DocumentObservable|Warning|0|An error occurred getting the Project Node for 'C:\Users\HP_administrator\Documents\Visual Studio 2017\Projects\OML Android\OML Android\OML Android.csproj'
System.InvalidCastException: Unable to cast COM object of type 'EnvDTE.SolutionClass' to interface type 'EnvDTE.Project'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{866311E6-C887-4143-9833-645F5B93F6F1}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
at Microsoft.VisualStudio.Shell.Interop.VsShellExtensions.ToDteProject(IVsHierarchy hierarchy) in E:\A\_work\1824\s\src\Core\Xamarin.VisualStudio.Interfaces\Extensions\VsShellExtensions.cs:line 233
at Xamarin.VisualStudio.DocumentObservable.OnBeforeDocumentWindowShow(UInt32 docCookie, Int32 fFirstShow, IVsWindowFrame pFrame) in E:\A\_work\1824\s\src\Core\VisualStudio\DocumentObservable.cs:line 33
这不是完整的日志(此处不适合),但是您应该了解一下。
我不知道这些错误是什么意思,我是否缺少某些软件包注册或某些此类注册?
答案 0 :(得分:0)
原来Windows 10上的安装文件夹不同于Windows7。我将备份还原到\ User \\ source \ repos,所有内容都已成功编译和部署。