I have the following code for creating a custom adapter and android studio is defaulting to the full path of my package. This was not always like this. I wonder what has changed. And it doesn't know what localNetView is even though is declare at the top of my class. Why does Android Studio do it like this? Without making any changes can't find the classes.

private ListView localNetListView;
private Adapter localNetAdapter;

localNetListView  = (ListView) findViewById(R.id.local_network);
localNetAdapter = new org.pctechtips.netdroid.HostAdapter(this, R.layout.list_main, localIfaceInfo);

1 Answers

Adib Faramarzi On Best Solutions

Make sure the "Use fully qualified class names" option under File > Settings > Editor > Code Style > Java > Imports tab is unchecked.

If this is only happening to a file, check the imports manually and see if another class with the same name (and different package) is imported, and remove its import line.