i want to upgrade my app to run in android 5.0.1 but i encounter an error (The method execute(Object[]) is ambiguous for the type WebTask) message when i try to compile.
My code:
private final ArrayBlockingQueue<WebTask> queue = new ArrayBlockingQueue<WebTask>(
1000);
private final List<WebTask> running = new ArrayList<WebTask>();
public synchronized void execute(final WebTask task) {
queue.add(task);
executeNext();
}
private synchronized void executeNext() {
WebTask<? extends Object, ? extends Object, ? extends Object> task = null;
while ((task = queue.peek()) != null) {
if (canRun(task))
queue.remove().execute(null); <----- error on execute
else
break;
}
}
public void onClick(final DialogInterface dialog, final int which) {
new WebTask(SettingsActivity.this, original,
newLocation).execute(null) <----- error on execute
dialog.dismiss();
}
Problem is that the extension (.zip, etc) of the downloaded file is missing, i need to rename it manually.
Can somebody please help? Thank you.