gpt4 book ai didi

java - 安卓 : execute() method of AsyncTask cannot be applied. 为什么?

转载 作者:行者123 更新时间:2023-12-02 00:28:40 26 4
gpt4 key购买 nike

代码:

attemptLogin.execute(editName.getText().toString(),editPassword.getText(),"");

上面一行有错误。

AsyncTask的代码如下:

private class AttemptLogin extends AsyncTask<String, String, JSONObject> {

@override

覆盖也有错误。

最佳答案

@override替换为@Override

同时将 attemptLogin.execute(editName.getText().toString(),editPassword.getText(),""); 替换为 attemptLogin.execute(editName.getText())。 toString(),editPassword.getText().toString(), obj);

注意:在第三个参数中,obj 的类型应为“JSONObject”。请务必将其作为参数发送。将“”替换为 JSONObject 实例。

关于java - 安卓 : execute() method of AsyncTask cannot be applied. 为什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58034034/

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