我收到此代码块的错误(不是语句): 如果有人有问题,请提出一些解决方案
else{
Toast.makeText(getApplicationContext(), "Swipe down to update the list", Toast.LENGTH_LONG).show;
swipeRefreshLayout.post(new Runnable()
{
@Override
public void run(){
swipeRefreshLayout.setRefreshing(true);
fetchMovies();
}
}
);
}
最佳答案
Toast.show
是一个方法,而不是一个属性。它应该被称为 show()
并在末尾加上括号:
Toast.makeText(getApplicationContext(), "Swipe down to update the list", Toast.LENGTH_LONG).show();
关于安卓错误: "Not a Statement" in a specific block of code,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59810896/