<分区>
嘿,这是我第一次使用堆栈溢出,我试图在不同的文件中调用一个类(MainActivity 调用 FetchWeatherTask)我得到的错误不是封闭类,这是代码抛出的错误
@Override
public boolean onOptionsItemSelected (MenuItem item){
int id = item.getItemId();
if (id == R.id.action_refresh) {
ForecastFragment.FetchWeatherTask weatherTask = new ForecastFragment.FetchWeatherTask();
weatherTask.execute();
return true;
}
我打算尝试一些事情,但我卡住了,完整的错误是
'com.alpha.(appName).ForecastFragment' 不是封闭类
编辑:
我正在尝试调用另一个文件中的类来获取天气数据