Ответ 1
Void
не Void
, измените его на тип void, если вы ничего не хотите возвращать.
Void - это класс, void - тип.
/**
* The {@code Void} class is an uninstantiable placeholder class to hold a
* reference to the {@code Class} object representing the Java keyword
* void.
*
* @author unascribed
* @since JDK1.1
*/
Если вы хотите Void
, вам нужно добавить оператор return
в конец.
Пример:
protected Void doInBackground() throws Exception
{
// some code
if (something)
{
return null;
}
return null;
}