2016-09-18 115 views
6

试图创建并与所有的默认运行第一Xamarin应用,构建失败,出现以下错误:无法运行Xamarin的Android项目

 
An unexpected error occurred trying to initialize Android Designer. 
Please verify the Android SDK path and the Java Development Kit path on 
Tools->Options->Xamarin->Android Settings menu. Please see the logs for more details. 

我试着在How to resolve : unexpected error occured Initializing Android Designer" in VS 2015 with Xamarin建议的解决方案。 然而,似乎没有任何工作。

+0

任何解决方案?我无法构建任何Android项目,但会在styles.xml中引发错误。 – Mrunal

+0

也许这可以帮助:http://stackoverflow.com/questions/39548053/how-to-resolve-unexpected-error-occured-initializing-android-designer-in-vs-2 –

+0

由于某种原因,安装Visual Studio(更新3)。在安装过程中,我选择了Xamarin所需的组件。不过,我仍然面临同样的问题。 –

回答

3

我遇到了同样的问题。我有followed the link that you shared并成功解决了我的环境。所以我会给出一些提示,以确保所有必要的步骤都已完成。

我有同样的错误“尝试初始化Android设计器时出现意外错误请验证工具 - >选项 - > Xamarin-> Android设置菜单上的Android SDK路径和Java开发工具包路径。记录更多细节。“

1) Go to Tools | Options | Xamarin | Other, and under Xamarin for Visual Studio Updates, Check now for STABLE updates. Make sure you're running at least 4.2.0.680. You will have to close Visual Studio in the background as the updater is running--it'll warn you. Uninstalling and installing the cross-platform development tools from Visual Studio was not applying this update for me. I had to force the issue.

要检查Xamarion版本,你可以按照 “版本信息” 一节中的步骤: https://developer.xamarin.com/guides/cross-platform/troubleshooting/questions/version-logs/

enter image description here

如果您使用的是Windows和Visual Studio将是: 帮助>关于Microsoft Visual Studio>复制信息[按钮]

2) Now, as mentioned earlier, go to Tools, Android SDK Manager. I noticed my "Android SDK Tools" and "Cross Platform Tools" were out of date and updates were available. I accepted and applied the updates to version 24.4.1. BEAR WITH ME, THIS IS WHERE IT GETS TRICKY--it still didn't work.

要ch ECK的Android SDK版本,您可以按照中的步骤“Android SDK工具,平台工具,构建工具”部分: https://developer.xamarin.com/guides/cross-platform/troubleshooting/questions/version-logs/

如果您使用的是Windows和Visual Studio将是: 选择SDK管理器工具栏图标: enter image description here

3)重复步骤2,更新 “Android SDK工具”,直到你去至少版本25.2.5

enter image description here

之后,它是非常重要的都为我工作。如果您还有其他问题,请告诉我。

+0

我也为我工作。非常感谢。非常感激。 :)但是,我无法在Xamarin Android Player模拟器上部署应用程序。我希望你也有一个解决方案。 –

+0

下一个错误是什么? – mqueirozcorreia