root root - 9 months ago 85
Android Question

AndroidStudio not recognizing .java file

For some unknown reason, android studio decided not to recognize the .java file. Any idea how to resolve this?

I've tried deleting the file and recreating it, but it still results in the same issue. When recreating the file, some error came up and the file is automatically recreated

enter image description here

enter image description here

public class SubmitDealAsyncTask extends AsyncTask<Void, Void, String> {

Answer Source

It turns out that there's a wrong file association entry which associate that particular filename as a JavaFX file.

Look in the Preferences > Editor > File Types under Java files, the name of file is there and all I needed to do is to remove it.