0

I am building Xamarin.Adnroid project with an mdtool from rakefile as a step in TeamCity build configuration.

The call is:

/Applications/Xamarin\ Studio.app/Contents/MacOS/mdtool build "--configuration:Debug" -p:"Project.Droid" -t:Build "Project.sln"

This (and even if I set -p:AndroidSdkDirectory=/Users/user/AndroidSDK) gives an error:

error: The Android SDK could not be found, please set the path to it in the Xamarin.Android SDKs settings panel.

I can use xbuild to build the project and specify the AndroidSDKPath via:

/usr/local/bin/xbuild Droid/Project.Droid.csproj /p:Configuration=Debug /t:SignAndroidPackage /p:AndroidSdkDirectory=/Users/user/AndroidSDK

but sine my solution hots both, Android and iOS projects, I'd like to be able to build both with mdtool.

Note that this question is unrelated to this one since the later of deals with the UI builds which work great in my case.

4

1 回答 1

0

我建议在构建主机上打开 Xamarin Studio 并在 Preferences > SDK Locations > Android 下配置 SDK 路径。那应该可以解决您的问题。

于 2017-02-09T09:50:47.573 回答