[英]Android App developement and Error in monodevelop
我已经在monodevelop(版本3.05)中编写了一个hello world应用程序,并试图在模拟器上运行它。 程序已成功编译,但是当我尝试运行它时,出现以下错误。
Detecting installed packages
Installing shared runtime
Deployment failed. Internal error
我已经安装了所有先决条件。
1. mono for Android
2. mono framework
3. gtk#
4. Android SDK
以下是代码。
using System;
using Android.App;
using Android.Content;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;
namespace myAndroid
{
[Activity (Label = "myAndroid", MainLauncher = true)]
public class Activity1 : Activity
{
int count = 1;
protected override void OnCreate (Bundle bundle)
{
base.OnCreate (bundle);
// Set our view from the "main" layout resource
SetContentView (Resource.Layout.Main);
// Get our button from the layout resource,
// and attach an event to it
Button button = FindViewById<Button> (Resource.Id.myButton);
button.Click += delegate {
button.Text = string.Format ("{0} clicks!", count++);
};
}
}
}
编辑:.Net 2.0 .Net 4.0 visual studio 2010 Express已安装在我的计算机上。 我在Windows 7上以管理员身份运行Visual Studio 2005,但如果这是与权限相关的问题,monodevelop并没有为我提供以管理员身份运行的选项。
我在VS2010和VS2012中也看到了这一点,其主要原因是,当项目未设置为在解决方案属性中部署时。
如果该部署标记被删除,您将遇到该问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.