我正在尝试在名为Opciones的类的AsyncTask中获取上下文(该类是唯一调用该任务的类),但我不知道如何实现,我看到了一些类似于这样的代码:
protected void onPostExecute(Long result) {
Toast.makeText(Opciones.this,"Subiendo la foto. ¡Tras ser moderada empezara a ser votada!: ", Toast.LENGTH_LONG).show();
}
但是对我不起作用,它显示:"No enclosing instance of the type Opciones in scope"
AsyncTask
中使用它。 - Torben Kohlmeier