我是 Xamarin 的新手,我正在學(xué)習(xí) Xamarin 大學(xué)教程。一切正常,直到我開始遇到錯誤core does not exist。我查看了發(fā)布的一個舊問題并按照說明進(jìn)行操作,但這對我沒有任何幫助。我已經(jīng)發(fā)布了下面舊問題的鏈接。MainPage.xml.cs 的代碼using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using Xamarin.Forms;namespace MyTelephone{ public partial class MainPage : ContentPage{ Entry phoneNumberText; Button translateButton; Button callButton; string translatedNumber; public MainPage() { this.Padding = new Thickness(20, 20, 20, 20); StackLayout panel = new StackLayout { Spacing = 15 }; panel.Children.Add(new Label { Text = "Enter a password:", FontSize = Device.GetNamedSize(NamedSize.Large, typeof(Label)) }); panel.Children.Add(phoneNumberText = new Entry { Text = "1-855-XAMARIN", }); panel.Children.Add(translateButton = new Button { Text = "Translate" }); panel.Children.Add(callButton = new Button { Text = "Call", IsEnabled = false, }); translateButton.Clicked += OnTranslate; this.Content = panel; //InitializeComponent(); } private void OnTranslate(object sender, EventArgs e) { translatedNumber = Core.PhonewordTranslator.ToNumber(phoneNumberText.Text); if (!string.IsNullOrEmpty(translatedNumber)) { callButton.IsEnabled = true; callButton.Text = "Call" + translatedNumber; } else { callButton.IsEnabled = false; callButton.Text = "Call"; } } }}
- 1 回答
- 0 關(guān)注
- 205 瀏覽
添加回答
舉報
0/150
提交
取消