我使用Visual Studio 2015和Xamarin。 我正在命名我的项目“Phoneword”我在Xamarin的网站上看到了这个代码,例如tutorial / example。
TranslateButton和CallButton成员的错误相同。
MainActivity.cs
using System; using Android.App; using Android.Content; using Android.Runtime; using Android.Views; using Android.Widget; using Android.OS; namespace Phoneword { [Activity(Label = "Phoneword", MainLauncher = true)] public class MainActivity : Activity { protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); // Set our view from the "main" layout resource SetContentView(Resource.Layout.Main); // Our code will go here // Get our UI controls from the loaded layout: EditText phoneNumberText = (EditText)FindViewById(Resource.Id.PhoneNumberText); Button translateButton = FindViewById