Problem running a MonoDevelop App

∥☆過路亽.° 提交于 2019-12-11 20:05:27

问题


This is a continuation of my Problem in creating a MonoDevelop App question,

The problem is solved, I am able to create an App, but now I'm having problems running it,

When I run the application I get an error saying,

C:\Users\tarun\Documents\Projects\myAndroidApp\myAndroidApp\aresgen:

Error 1: Could not find SDK platform directory 'C:\Program Files (x86)\Android\android-sdk\platforms\android-4'.

Ensure you have installed support for this Android platform version in the Android SDK Manager. (1) (myAndroidApp)

Also have the following problem,

when I hit tools > options > other > Mono For Android SDKs, I get the following error,

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)

Also, I get this same error (the one mentioned above), when I right-click project > options > Build > Mono For android build/Mono for android applications

My MonoDevelop version is 2.6(2.5.90)

Help appreciated !


回答1:


Believe it or not, I read about a problem with the SDK where it can't parse the spaces in the path. Try reinstalling the Android SDK to a path without spaces. In my case, I installed it to C:\Android\android-sdk.



来源:https://stackoverflow.com/questions/6726387/problem-running-a-monodevelop-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!