创建MonoDevelop应用程序

时间:2011-06-16 19:57:02

标签: android monodevelop xamarin.android

我正在尝试在Mono中创建一个MonoDevelop - for-Android应用程序。我使用的是Windows 7 64位,而我的MonoDevelop版本是2.6 Beta 3。

当我输入应用程序名称并点击前进按钮时,它会给我以下错误,

  1. 无法写入文件Activity1.cs。

  2. 无法写入文件资源。

  3. 无法写入文件属性。

  4. 无法写入文件资产。

  5. 有什么问题?

    错误1的错误详细信息

    System.MissingMethodException: Method not found: 'MonoDevelop.Projects.ProjectFile MonoDevelop.Projects.ProjectFileEventArgs.get_ProjectFile()'.
    
       at MonoDevelop.MonoDroid.MonoDroidProject.OnFileAddedToProject(ProjectFileEventArgs e)
    
       at MonoDevelop.Projects.Project.NotifyFileAddedToProject(IEnumerable`1 objs)
    
       at MonoDevelop.Projects.Project.OnItemsAdded(IEnumerable`1 objs)
    
       at MonoDevelop.Projects.DotNetProject.OnItemsAdded(IEnumerable`1 objs)
    
       at MonoDevelop.Projects.ProjectItemCollection`1.NotifyAdded(IEnumerable`1 items, Boolean comesFromParent)
    
       at
    
        MonoDevelop.Projects.ProjectItemCollection`1.MonoDevelop.Projects.IItemListHandler.InternalAdd(IEnumerable`1 objs, Boolean comesFromParent)
    
           at MonoDevelop.Projects.ProjectItemCollection`1.NotifyAdded(IEnumerable`1 items, Boolean comesFromParent)
    
           at MonoDevelop.Projects.ProjectItemCollection`1.OnItemAdded(T item)
    
           at MonoDevelop.Projects.ItemCollection`1.InsertItem(Int32 index, T item)
    
           at System.Collections.ObjectModel.Collection`1.Add(T item)
    
           at MonoDevelop.Projects.Project.AddFile(String filename, String buildAction)
    
           at MonoDevelop.Ide.Templates.SingleFileDescriptionTemplate.AddFileToProject(SolutionItem policyParent, Project project, String language, String directory, String name)
    
           at MonoDevelop.Ide.Templates.SingleFileDescriptionTemplate.AddToProject(SolutionItem policyParent, Project project, String language, String directory, String name)
    
           at MonoDevelop.Ide.Templates.ProjectDescriptor.InitializeItem(SolutionItem policyParent, ProjectCreateInformation projectCreateInformation, String defaultLanguage, SolutionEntityItem item)
    

    获取其他错误的类似详细信息。

    这是我在安装AddIn时获得的:

    Enter image description here

    当我点击工具>选项>其他> Mono for Android SDK时,我在弹出窗口中收到以下错误(和错误详情)

      

    未处理的异常

    System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Mono.Posix, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' or one of its dependencies. The system cannot find the file specified.
    
       at MonoDevelop.MonoDroid.Gui.MonoDroidSdkSettingsWidget.Build()
    
       at MonoDevelop.MonoDroid.Gui.MonoDroidSdkSettingsWidget..ctor()
    
       at MonoDevelop.MonoDroid.Gui.MonoDroidSdkSettings.CreatePanelWidget()
    
       at MonoDevelop.Ide.Gui.Dialogs.OptionsDialog.CreatePageWidget(SectionPage page)
    
       at MonoDevelop.Ide.Gui.Dialogs.OptionsDialog.ShowPage(OptionsDialogSection section)
    
       at MonoDevelop.Ide.Gui.Dialogs.OptionsDialog.OnSelectionChanged(Object s, EventArgs a)
    
       --- End of inner exception stack trace ---
    
       at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
    
       at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
    
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
    
       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)
    

2 个答案:

答案 0 :(得分:1)

不知何故,你有一个Mono for Android插件的版本与你的MonoDevelop版本不匹配。尝试将MD更新为2.6 b2,然后通过插件管理器更新插件。

答案 1 :(得分:1)

我遇到了同样的错误,并通过查看Daniel Soto对 Error creating Android app 的回答找到了解决方案。基本上,安装MonoDevelop here的2.5.90.3主干版本。

我能够继续。