2017-02-09 133 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路徑。這應該能解決你的問題。