我想为一些aSyncTasks创建基类.我创建了一个抽象类
public abstract class AsyncTaskBase extends
AsyncTask {}
还有两个从其继承aSyncTaskA的AsyncTask类:
public class AsyncTaskA extends AsyncTaskBase {
@Override
protected String doInBackground(String... params)
{
return "A";
}
}
还有两个从其继承aSyncTaskB的AsyncTask类:
public class AsyncTaskB extends AsyncTaskBase {
@Override
protected String doInBackground(String... params)
{
return "B";
}
}
在调用方法中,我调用:
AsyncTaskBase asyncTask;
// Call aSyncA
asyncTask = new AsyncTaskA();
asyncTask.execute();
// Call aSyncB
asyncTask = new AsyncTaskB();
asyncTask.execute();
但是我收到以下错误消息
05-02 17:00:18.674: E/AndroidRuntime(20120): Caused by: java.lang.ClassCastException: java.lang.Object[] cannot be cast to java.lang.String[]
任何想法出了什么问题