相关疑难解决方法(0)

在AsyncTask中获取上下文

我试图在我的AsyncTask中获取名为Opciones的类的上下文(这个类是唯一一个调用该任务的类),但我不知道该怎么做,我看到了一些像这样的代码:

      protected void onPostExecute(Long result) {

    Toast.makeText(Opciones.this,"Subiendo la foto. ¡Tras ser moderada empezara a ser votada!: ", Toast.LENGTH_LONG).show(); 
}
Run Code Online (Sandbox Code Playgroud)

但它对我不起作用它说: "No enclosing instance of the type Opciones in scope"

android toast android-context android-asynctask

78
推荐指数
3
解决办法
7万
查看次数