无法运行 Xamarin Android 项目 [英] Unable to run Xamarin Android project

查看:28
本文介绍了无法运行 Xamarin Android 项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

<前>尝试初始化 Android Designer 时发生意外错误.请验证 Android SDK 路径和 Java Development Kit 路径工具->选项->Xamarin->Android 设置菜单.请查看日志以获取更多详细信息.

我尝试了

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

<块引用>

2) 现在,如前所述,转到工具"、Android SDK 管理器".一世注意到我的Android SDK 工具"和跨平台工具"已失效日期和更新可用.我接受并将更新应用到版本 24.4.1.忍受我,这就是它变得棘手的地方——它仍然没有用.

要查看 Android SDK 版本,您可以按照Android SDK 工具、平台工具、构建工具"部分中的步骤操作:

3) 重复第 2 步很重要,更新Android SDK 工具",直到您至少使用 25.2.5 版

在那之后,一切都为我工作.如果您有任何其他问题,请告诉我.

While trying to create and run the first Xamarin app with all the defaults, the build fails with the following error:

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.

I tried the solution suggested in How to resolve : unexpected error occured Initializing Android Designer" in VS 2015 with Xamarin. However, nothing seems to work.

解决方案

I was having the same problem. I have followed the link that you shared and successfully solved my environment. So I'll give some hints to make sure that all the necessary steps were made.

I was having the same error "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."

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.

To check Xamarion Version, you can follow the steps in the "Version information" section: https://developer.xamarin.com/guides/cross-platform/troubleshooting/questions/version-logs/

If you are using Windows and Visual Studio it will be : Help > About Microsoft Visual Studio > Copy Info [button]

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.

To check Android SDK Version, You can follow the steps in the "Android SDK Tools, Platform-tools, Build-tools" section: https://developer.xamarin.com/guides/cross-platform/troubleshooting/questions/version-logs/

If you are using Windows and Visual Studio it will be : Select the SDK Manager toolbar icon:

3) It is important to repeat step 2, updating "Android SDK Tools" until you go at least version 25.2.5

After that all have worked for me. Please let me know if you have any further problem.

这篇关于无法运行 Xamarin Android 项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆