I recently added the Android Support Library v7 AppCompat component to my project.
From Xamarin Studio, it builds and runs as expected. However, when I build it from command-line:
"/Applications/Xamarin Studio.app/Contents/MacOS/mdtool" -v build "--configuration:"Debug:Android MyApplication.sln
the build fails (See below for full log). Input that helps me understand what is going on here would be much appreciated, as the situation seems bizarre to me - being able to build only from within Xamarin Studio.
Thanks in advance.
Build log:
MonoDevelop Build Tool
INFO:Found Xcode, version 5.0.2 (3335.32).
INFO:Found Xamarin.iOS, version 7.0.4.209.
Loading solution: /Users/mikkel/myApp/MyApplication.sln
Loading solution: /Users/mikkel/myApp/MyApplication.sln
Loading projects ..
ERROR [2013-12-20 11:22:46Z]: ANDROID: Adb server launch operation failed:
ERROR [2013-12-20 11:22:46Z]: ANDROID: Adb server launch operation failed:
ERROR [2013-12-20 11:22:46Z]: Component 'xamandroidsupportv7appcompat' entered state 'ResolveError' (was: Resolved)
System.NullReferenceException: Object reference not set to an instance of an object
at Xwt.Application.Invoke (System.Action action) [0x00035] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/monodevelop/main/external/xwt/Xwt/Xwt/Application.cs:128
at Xamarin.Components.Ide.Component.SetState (ComponentState newState) [0x000cf] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/md-addins/Xamarin.Ide/Xamarin.Components.Ide/Components/Component.cs:161
at Xamarin.Components.Ide.Component.InfoDownloadCompleted (System.Object sender, System.EventArgs args) [0x00077] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/md-addins/Xamarin.Ide/Xamarin.Components.Ide/Components/Component.cs:386
ERROR: Could not load solution: /Users/mikkel/myApp/MyApplication.sln. Object reference not set to an instance of an object
FATAL ERROR [2013-12-20 11:22:46Z]: System.NullReferenceException: Object reference not set to an instance of an object
Server stack trace:
at Xwt.Application.Invoke (System.Action action) [0x00035] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/monodevelop/main/external/xwt/Xwt/Xwt/Application.cs:128
at Xamarin.Components.Ide.Component.SetState (ComponentState newState) [0x000cf] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/md-addins/Xamarin.Ide/Xamarin.Components.Ide/Components/Component.cs:161
at Xamarin.Components.Ide.Component.InfoDownloadCompleted (System.Object sender, System.EventArgs args) [0x000ce] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/md-addins/Xamarin.Ide/Xamarin.Components.Ide/Components/Component.cs:397
at Xamarin.Components.Ide.ComponentDownload.add_Completed (System.EventHandler value) [0x0004d] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/md-addins/Xamarin.Ide/Xamarin.Components.Ide/Components/ComponentDownload.cs:89
at Xamarin.Components.Ide.Component.BeginResolve () [0x0003b] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/md-addins/Xamarin.Ide/Xamarin.Components.Ide/Components/Component.cs:313
at Xamarin.Components.Ide.Component.StartResolving (Boolean installAssemblies) [0x0009a] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/md-addins/Xamarin.Ide/Xamarin.Components.Ide/Components/Component.cs:302
at Xamarin.Ide.Components.XamarinComponentReference.BindToProject (IComponentReferencingProjectAdaptor adaptor) [0x00060] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/md-addins/Xamarin.Ide/Xamarin.Ide/Xamarin.Ide.Components/XamarinComponentReference.cs:45
at Xamarin.Ide.Components.ComponentReferencingProjectAdaptor.BindToProject () [0x0002d] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/md-addins/Xamarin.Ide/Xamarin.Ide/Xamarin.Ide.Components/ComponentReferencingProjectAdaptor.cs:73
at (wrapper managed-to-native) System.Runtime.Remoting.RemotingServices:InternalExecute (System.Reflection.MethodBase,object,object[],object[]&)
at System.Runtime.Remoting.RemotingServices.InternalExecuteMessage (System.MarshalByRefObject target, IMethodCallMessage reqMsg) [0x000c2] in /private/tmp/source/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-3.2.5/mcs/class/corlib/System.Runtime.Remoting/RemotingServices.cs:151
Exception rethrown at [0]:
at Xwt.Application.Invoke (System.Action action) [0x00035] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/monodevelop/main/external/xwt/Xwt/Xwt/Application.cs:128
at Xamarin.Components.Ide.Component.SetState (ComponentState newState) [0x000cf] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/md-addins/Xamarin.Ide/Xamarin.Components.Ide/Components/Component.cs:161
at Xamarin.Components.Ide.Component.InfoDownloadCompleted (System.Object sender, System.EventArgs args) [0x000ce] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/md-addins/Xamarin.Ide/Xamarin.Components.Ide/Components/Component.cs:397
at Xamarin.Components.Ide.ComponentDownload.add_Completed (System.EventHandler value) [0x0004d] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/md-addins/Xamarin.Ide/Xamarin.Components.Ide/Components/ComponentDownload.cs:89
at Xamarin.Components.Ide.Component.BeginResolve () [0x0003b] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/md-addins/Xamarin.Ide/Xamarin.Components.Ide/Components/Component.cs:313
at Xamarin.Components.Ide.Component.StartResolving (Boolean installAssemblies) [0x0009a] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/md-addins/Xamarin.Ide/Xamarin.Components.Ide/Components/Component.cs:302
at Xamarin.Ide.Components.XamarinComponentReference.BindToProject (IComponentReferencingProjectAdaptor adaptor) [0x00060] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/md-addins/Xamarin.Ide/Xamarin.Ide/Xamarin.Ide.Components/XamarinComponentReference.cs:45
at Xamarin.Ide.Components.ComponentReferencingProjectAdaptor.BindToProject () [0x0002d] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/md-addins/Xamarin.Ide/Xamarin.Ide/Xamarin.Ide.Components/ComponentReferencingProjectAdaptor.cs:73
at (wrapper managed-to-native) System.Runtime.Remoting.RemotingServices:InternalExecute (System.Reflection.MethodBase,object,object[],object[]&)
at System.Runtime.Remoting.RemotingServices.InternalExecuteMessage (System.MarshalByRefObject target, IMethodCallMessage reqMsg) [0x000c2] in /private/tmp/source/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-3.2.5/mcs/class/corlib/System.Runtime.Remoting/RemotingServices.cs:151