Monodroid不支持xamarin中的先前版本

时间:2016-02-14 09:59:19

标签: c# android xamarin mono xamarin.android

今天我下载visual studio 2015。因为我想启动android编程。

所以我可以在这里下载xamarin for visual studio

enter image description here

所以安装了其他数据包,如您所见:

enter image description here

所以我创建了一个blank apps,代码是这样的:

namespace App1
{
    [Activity(Label = "App1", MainLauncher = true, Icon = "@drawable/icon")]
    public class MainActivity : 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++); };
        }
    }
}

我安装此文件,但我不知道究竟是什么,我认为它是模拟器mono-4.2.2.30-gtksharp-2.12.30-win32-0

但是当我运行这个程序时

enter image description here

我收到此错误:

Severity    Code    Description Project File    Line    Suppression State
Warning     @(Content) build action is not supported    App1    C:\Users\ehsan\Documents\Visual Studio 2015\Projects\App1\App1\Properties\AndroidManifest.xml

enter image description here

我应该添加的一件事是视觉列表中没有模拟器:

enter image description here

0 个答案:

没有答案