Android: not abe to find Looper.quit ()

The name explains all this. I have a class that extends AsyncTask. I call it directly in the main thread using the new class name.execute ().

Now in doInBackground (params) I have Looper.prepare. Since I get the error message โ€œOnly one Looper can be created for each threadโ€, I need to use Looper.quit () inside it. But I cannot find it inside the Looper class when I write Looper.quit ();

So how to use this quit function

+4
source share
1 answer

You must call Looper.myLooper (). quit ()

+4
source

All Articles