Unable to run Xamarin Android project

后端 未结 1 865
时光取名叫无心
时光取名叫无心 2021-02-08 23:22

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 initializ         


        
1条回答
  •  终归单人心
    2021-02-08 23:47

    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.

    0 讨论(0)
提交回复
热议问题