error - Can't create project with type: MonoDroid

guy.7116guy.7116 USMember
edited July 2014 in Visual Studio

Just tried running through the android guides and immediately hit this error

Can't create project with type: MonoDroid

with the following details:

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at MonoDevelop.Projects.SolutionFolderItemCollection.OnItemAdded(SolutionItem item)
   at MonoDevelop.Projects.ItemCollection`1.InsertItem(Int32 index, T item)
   at System.Collections.ObjectModel.Collection`1.Add(T item)
   at MonoDevelop.Projects.SolutionFolder.AddItem(SolutionItem item, Boolean createSolutionConfigurations)
   at MonoDevelop.Ide.Projects.NewProjectDialog.OpenEvent(Object sender, EventArgs e)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   at GLib.Signal.ClosureInvokedCB(Object o, ClosureInvokedArgs args)
   at GLib.SignalClosure.Invoke(ClosureInvokedArgs args)
   at GLib.SignalClosure.MarshalCallback(IntPtr raw_closure, IntPtr return_val, UInt32 n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal_data)


All I was trying to do was add a new C#/android project to a new solution. Xamarin is all up to date and it's got a tick next to the SDK/NDK/JDK locations in options. Any ideas?


  • guy.7116guy.7116 USMember

    Been on/off attempting to get this working for the past 4 hours. Ended up uninstalling it to reinstall but it failed when trying to use the universal installer. So now I'm jumping through all the hoops of a manual install which isn't going much better.

    When installing studio it tells me I need Gtk# v2.12.22 even though I've been to the mono site and installed the latest version they have, which seems to be 2.12.21. Even the xamarin link here points to v2.12.21

  • guy.7116guy.7116 USMember

    tada, and it's working.

    So for any other poor unfortunate soul that finds themselves in teh same situation, here's what I did after the above.

    -uninstalled gtk#
    -run universal installer which failed but gave me the links for studio, xamarin and gtk# v2.12.25 (25!)
    -installed gtk# from that link
    -tried to install xamarin studio from the link but it kept failing as it couldn't stop the xamarin bonjour service. Not sure why or how it was running since I'd uninstalled all xamarin stuff already.
    -booted to safe mode and disabled the bonjour service
    -booted back in to normal windows and run the universal installer, which did finally work. yay, half a day flushed down the toilet.

    It may have been the bonjour service causing a problem all along, who knows.

  • jkbelljkbell USMember

    I am having the same problem after manual installation (my machine has no network connection). I have GTK# 2.12.25 with Xamarin Studio 5.5.4. All the required components in Tools | Options | SDK Locations | Android are checked. What could I be missing?

  • mhutchmhutch USMember, Xamarin Team Xamurai

    It's unlikely to be the Bonjour service because it's only used by Visual Studio.

    My guess would be that because the web installer didn't work for you, you ended up with some old and/or mismatched versions. If you contact [email protected] they should be able to assist with an offline installation.

  • I have gone through a manual install and still can't get a solution to this problem. Xamarin support leaves much to be desired though. Not impressed.

  • mhutchmhutch USMember, Xamarin Team Xamurai

    Since only a couple of people are seeing this it's likely to be something to do with your environment or a corrupt installation. Could you please file a bug and include the log file with the error (Help->Open Log Directory) and the full version/environment information from the About dialog?

  • Viet.5909Viet.5909 USMember
    edited February 2015

    im face the same problem on MAC, webinstaller so bad so im manually, but got many error, poor xamarin!. maybe change to phonegap or ionic!.

  • SyedUzairSyedUzair INMember

    Similar problem getting.. Attaching the Log file!!!, when creating the first application getting message "Can't create project with type : monoDriod" Please help to resolve

  • mhutchmhutch USMember, Xamarin Team Xamurai

    It looks like Xamarin.Android is not installed:

        INFO [2015-02-12 16:02:39Z]: ANDROID: Did not find Xamarin.Android
        INFO [2015-02-12 16:02:39Z]: ANDROID: Found Android SDK. API levels: (none)
        INFO [2015-02-12 16:02:39Z]: Xamarin.Android SDK not found, disabling Xamarin.Android addin

    @GregMunn we should probably hide the templates or show some kind of "please install XA" dialog in that case.

Sign In or Register to comment.