gpt4 book ai didi

visual-studio-2015 - 无法运行Xamarin Android项目

转载 作者:行者123 更新时间:2023-12-02 11:04:26 26 4
gpt4 key购买 nike

尝试使用所有默认值创建并运行第一个 Xamarin 应用程序时,构建失败并出现以下错误:

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 中建议的解决方案。然而,似乎没有任何作用。

最佳答案

我也遇到了同样的问题。我有followed the link that you shared并成功解决了我的环境。因此,我将提供一些提示,以确保完成所有必要的步骤。

我遇到了同样的错误“尝试初始化 Android Designer 时发生意外错误。请在“工具”->“选项”->“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.

要检查 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

之后一切都对我有用。如果您还有任何其他问题,请告诉我。

关于visual-studio-2015 - 无法运行Xamarin Android项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39560288/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com