gpt4 book ai didi

安卓错误 : "Not a Statement" in a specific block of code

转载 作者:行者123 更新时间:2023-12-04 10:43:48 24 4
gpt4 key购买 nike

我收到此代码块的此错误(不是语句):
如果有人有,请提出一些解决方案

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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com