I'm developing an android app in eclipse and this is what I'm calling in my main activity:
new PhotoUpdate(app).execute(Pair.create(PhotoUpdate.PARAM_FILE, photoPath));
My AsyncTask class Looks like this:
public class PhotoUpdate extends AsyncTask<Pair<String, String>, Void, String> {
//some code
@Override
protected String doInBackground(Pair<String, String>...params) {
//delegate functionality to some other methods
}
}
However, In my activity I'm getting a compiler error where I call execute that says:
The method execute(Pair<String,String>...) in the type
AsyncTask <Pair<String,String>,Void,String> is not applicable for the arguments
(Pair<String,String>)
And these are the quick fixes it provides:
Essentialy its complaining that I cant pass a pair of strings to a function that takes multiple pairs of string, this doesn't make sense. Has anybody else seen this error?
Solved the Issue!
I am using a support Library in my project and the Pair Objects in the
PhotoUpate
Class and the Pair object I used to call execute were from different libraries (one was from support library on was from the android library).