我最近安装了monodroid和Visual Studio 2010 Professional的附加组件.它似乎在新项目中有部分编码,它似乎不是一个有效的示例代码.它使用菜单中的"构建解决方案"编译好,但它在android模拟器中不起作用.我期待一个只有文件结构的空白项目,但它似乎给了我一个不完整的示例项目.这与visual studio 2010 pro和monodevelop都有关.
是否只有文件结构的空白项目?如果是的话我在哪里可以访问它们?如果这是一个空白模板,那么为什么有些代码看起来像一个按钮计数器.
谢谢乔恩
using System;
using Android.App;
using Android.Content;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;
namespace helloworld_a3
{
[Activity(Label = "helloworld_a3", MainLauncher = true, Icon = "@drawable/icon")]
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 …Run Code Online (Sandbox Code Playgroud)