8

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.

3
  • Any solution for this? I am not able to build any Android project, it throws errors at styles.xml. Commented Nov 23, 2016 at 12:17
  • Maybe this can help: stackoverflow.com/questions/39548053/… Commented Dec 5, 2016 at 1:58
  • For some reason I had to re-install Visual Studio (update 3). During the installation, I selected the necessary components for Xamarin. However, I'm still facing the same issue. Commented Jan 24, 2017 at 4:39

1 Answer 1

4

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/

enter image description here

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: enter image description here

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

enter image description here

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

Sign up to request clarification or add additional context in comments.

1 Comment

I did work for me too. Thanks a lot. Much appreciated. :) However, I'm unable to deploy the app on Xamarin Android Player emulator. I hope you have a solution for that as well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.