2017-02-09 134 views
0

我使用rakefile中的mdtool构建Xamarin.Adnroid项目,作为TeamCity构建配置中的一个步骤。在mac上提供AndroidSDK路径到mdtool

呼叫是:

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

此(和即使我设置-p:AndroidSdkDirectory = /用户/用户/ AndroidSDK)给出了一个错误:

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

我可以使用xbuild到建设该项目,并通过指定AndroidSDKPath:

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

但正弦我的解决方案既白热化,Android和iOS的项目中,我我希望能够与mdtool一起构建。

请注意,这个问题与this one无关,因为与UI有关的交易的后期构建对我而言非常有用。

回答

0

我建议在构建主机上打开Xamarin Studio并在首选项> SDK位置> Android下配置SDK路径。这应该能解决你的问题。