我正在使用rakefile中的mdtool构建Xamarin.Adnroid项目,作为TeamCity构建配置中的一个步骤。
号召是:
/Applications/Xamarin\ Studio.app/Contents/MacOS/mdtool build "--configuration:Debug" -p:"Project.Droid" -t:Build "Project.sln"这(即使我设置了-p:AndroidSdkDirectory=/Users/user/AndroidSDK),也会产生一个错误:
错误:未能找到Android,请在Xamarin.Android SDK设置面板中设置它的路径。
我可以使用xbuild构建项目,并通过以下方式指定AndroidSDKPath:
/usr/local/bin/xbuild Droid/Project.Droid.csproj /p:Configuration=Debug /t:SignAndroidPackage /p:AndroidSdkDirectory=/Users/user/AndroidSDK但是如果我的解决方案对安卓和iOS项目都有吸引力的话,我希望能够用mdtool来构建这两个项目。
请注意,这个问题与this one无关,因为后者处理UI构建,这在我的例子中非常有用。
发布于 2017-02-09 09:50:47
我建议在构建主机上打开Xamarin,并在Preferences > SDK位置> Android下配置SDK路径。这应该能解决你的问题。
https://stackoverflow.com/questions/42132828
复制相似问题