Java – the symbol ‘asynctask’ cannot be resolved in Android studio

I have a class that extends asynctask in Java, but Android studio will fail to resolve the symbol asynctask

class GcmRegistrationAsyncTask extends AsyncTask<Void,Void,String> {
// CLASS CODE
}

Did I miss the import declaration or my code is wrong?

Solution

I encountered the same problem in Android studio installation Automatic organization doesn't work, but if you manually add and import Android os. AsyncTask; For your import, the class will be found

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>