Visual Studio : The Android SDK Directory could not be found. Please set via /p:AndroidSdkDirectory

后端 未结 3 1825
我在风中等你
我在风中等你 2021-02-19 22:11

I have installed Xamarin plugin for Visual Studio 2012.

And when create an Android Project and build the same. I am getting the following error.

E

3条回答
  •  余生分开走
    2021-02-19 22:50

    If you don't have Visual Studio try to set Android SDK path to AndroidSdkDirectory environment variable.

    For example I have Android SDK installed in /home/user1/.android-sdk-installer/android-sdk-linux, so I set environment variable like this in terminal:

    export AndroidSdkDirectory=/home/user1/.android-sdk-installer/android-sdk-linux
    

    Do not forget that export set environment variables only for current terminal.

    Also it's easier to set environment variable once, rather then pass /p:AndroidSdkDirectory every time you want to build.

提交回复
热议问题