【发布时间】:2014-03-28 23:04:42
【问题描述】:
我一直在 Visual Studio 中试验/检查 Xamarin 以进行最后的发呆。
不过,昨天我打开 Android SDK Manager,看到有四个(我认为是)需要更新的包。但是,尝试这样做失败了,说“无法移动文件夹。在 Windows 上,这通常意味着 android sdk manager...")。
然后我关闭并重新启动了 VS2013 / Xamarin。随后尝试打开 SDK 管理器只会导致错误消息(“由于意外异常,命令未成功执行。请检查输出窗口以获取更多信息”)。以下是“更多详情”:
System.ComponentModel.Win32Exception (0x80004005):系统找不到指定的文件 在 System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) 在 System.Diagnostics.Process.Start() 在 Mono.VisualStudio.Extension.ProcessWrapper.RunWithOutput(字符串可执行文件,Int32 等待时间,字符串 workingDir,IVsOutputWindowPane outputPane,字符串 [] 参数) 在 Mono.Android.VisualStudio.MonoAndroidSdk.StartAndroidSdkManager() 在 Mono.Android.VisualStudio.Commands.StartSdkManager.Execute(IMenuCommand 命令) 在 Mono.VisualStudio.Extension.Commands.VsCommandExtensionAdapter.c__DisplayClass5.b__3() 在 Mono.VisualStudio.Extension.TracingExtensions.ShieldUI(ITracer tracer, Action action, String format, String[] args)
现在(即使在重新启动 Windows 之后)我什至无法打开项目,我认为这是由于侧轨升级的中断状态。这些是我看到的:
还有这些错误消息:
不支持 此版本的 Visual Studio 无法打开以下项目。项目类型可能未安装,或者此版本的 Visual Studio 可能不支持它们。 有关启用这些项目类型或以其他方式迁移资产的更多信息,请参阅单击确定后显示的“迁移报告”中的详细信息。 - PlatypusMobile.Android,“C:\Users\clay\documents\visual studio 2013\Projects\PlatypusMobile\PlatypusMobile.Android.csproj”
需要进行非功能性更改 Visual Studio 将自动对以下项目进行非功能性更改,以使它们能够在 Visual Studio 2013、Visual Studio 2012 和 Visual Studio 2010 SP1 中打开。项目行为不会受到影响。 - PlatypusMobile,“C:\Users\clay\documents\visual studio 2013\Projects\PlatypusMobile\PlatypusMobile.sln”
另外,据说要查看的错误消息之一:
C:\users\clay\AppData\Roaming\Microsoft\VisualStudio\12.0\ActivityLog.xml
这是其中最有趣的部分:
<?xml version="1.0" encoding="utf-16"?>
<?xml-stylesheet type="text/xsl" href="ActivityLog.xsl"?>
<activity>
<entry>
<record>1</record>
<time>2014/03/28 15:03:09.061</time>
<type>Information</type>
<source>VisualStudio</source>
<description>Microsoft Visual Studio 2013 version: 12.0.30110.0</description>
</entry>
<entry>
<record>2</record>
<time>2014/03/28 15:03:09.061</time>
<type>Information</type>
<source>VisualStudio</source>
<description>Running in User Groups: Administrators Users</description>
</entry>
<entry>
<record>3</record>
<time>2014/03/28 15:03:09.061</time>
<type>Information</type>
<source>VisualStudio</source>
<description>Available Drive Space: C:\ drive has 820592128000 bytes</description>
</entry>
. . .
<entry>
<record>924</record>
<time>2014/03/28 15:03:55.266</time>
<type>Error</type>
<source>Extension Manager</source>
<description>Extension will not be loaded because an extension with the same ID 'Microsoft.Windows.DevelopmentKit.Desktop' is already loaded at C:\PROGRAM FILES (X86)\COMMON FILES\MICROSOFT\EXTENSIONMANAGER\EXTENSIONS\MICROSOFT\WINDOWS KITS\8.0\DESKTOP SDK\...</description>
<path>C:\PROGRAM FILES (X86)\COMMON FILES\MICROSOFT\EXTENSIONMANAGER\EXTENSIONS\MICROSOFT\WINDOWS KITS\8.1\DESKTOP SDK\</path>
</entry>
. . .
<entry>
<record>1001</record>
<time>2014/03/28 15:04:42.000</time>
<type>Information</type>
<source>VisualStudio</source>
<description>Begin package load [MonoAndroidPackage]</description>
<guid>{296E6A4E-2BD5-44B7-A96D-8EE3D9CDA2F6}</guid>
</entry>
<entry>
<record>1011</record>
<time>2014/03/28 15:09:31.962</time>
<type>Error</type>
<source>VisualStudio</source>
<description>SetSite failed for package [MonoAndroidPackage]</description>
<guid>{296E6A4E-2BD5-44B7-A96D-8EE3D9CDA2F6}</guid>
<hr>80131509</hr>
<errorinfo>This property is not valid when the SDK is not installed</errorinfo>
</entry>
<entry>
<record>1012</record>
<time>2014/03/28 15:09:31.963</time>
<type>Error</type>
<source>VisualStudio</source>
<description>End package load [MonoAndroidPackage]</description>
<guid>{296E6A4E-2BD5-44B7-A96D-8EE3D9CDA2F6}</guid>
<hr>80131509</hr>
<errorinfo>This property is not valid when the SDK is not installed</errorinfo>
</entry>
<entry>
<record>1014</record>
<time>2014/03/28 15:17:40.128</time>
<type>Information</type>
<source>VisualStudio</source>
<description>Begin package load [MonoAndroidPackage]</description>
<guid>{296E6A4E-2BD5-44B7-A96D-8EE3D9CDA2F6}</guid>
</entry>
<entry>
<record>1015</record>
<time>2014/03/28 15:17:42.660</time>
<type>Error</type>
<source>VisualStudio</source>
<description>SetSite failed for package [MonoAndroidPackage]</description>
<guid>{296E6A4E-2BD5-44B7-A96D-8EE3D9CDA2F6}</guid>
<hr>80131500</hr>
<errorinfo>There is already a logger with the name 'Xamarin.Android'</errorinfo>
</entry>
<entry>
<record>1016</record>
<time>2014/03/28 15:17:42.660</time>
<type>Error</type>
<source>VisualStudio</source>
<description>End package load [MonoAndroidPackage]</description>
<guid>{296E6A4E-2BD5-44B7-A96D-8EE3D9CDA2F6}</guid>
<hr>80131500</hr>
<errorinfo>There is already a logger with the name 'Xamarin.Android'</errorinfo>
</entry>
</activity>
如何重新组合破碎的碎片并让项目再次打开,以便我可以重新尝试升级 Android SDK 包? Humpty-Dumpty 可以重新组合起来吗?
注意:与此同时,我在 Android Studio 中启动并运行了我的第一个应用程序。
【问题讨论】:
-
“在 Windows 上,这通常意味着 android sdk manager...”看起来被切断了...?
-
很抱歉;更完整的措辞:“在 Windows 上,这通常意味着某个程序正在使用该文件夹(例如 Windows 资源管理器或您的防病毒软件。)请暂时停用您的防病毒软件。请同时关闭任何可能运行的程序正在访问目录 [Bla]"
标签: visual-studio-2013 xamarin.android xamarin visual-studio-extensions