当我给出我的线程名称时,它表明它无法解析符号。我想停止线程并在按下后退按钮时转到索引页 using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using Microsoft.Maps.MapControl.WPF;
namespace Geography
{
/// <summary>
/// Interaction logic for Maps.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
myMap.Focus();
//Set map to Aerial mode with labels
myMap.Mode = new AerialMode();
}
}
}
(indexactivity)
这是发现错误的地方。
答案 0 :(得分:0)
Cannot resolve symbol t
即将到来,因为您已在onCreate()
方法中声明了此变量,并尝试在其他方法中使用它来删除回调。按照与变量j
在课堂级别定义此Runnable
,如下所示
final Runnable t = null; // if you need final keep it, otherwise remove it
并更改
final Runnable t = new Runnable() {
到
t = new Runnable() {