Unable to run Xamarin Android project

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.

链接地址: http://www.djcxy.com/p/36310.html

上一篇: Lib(s)输入:创建带有多个按钮的游戏杆

下一篇: 无法运行Xamarin Android项目