Using Eclipse Shift + Ctrl + O to organize the import works fine until it stops working.
For some reason, it now removes my necessary imports and does not allow classes. Example below: Button, onClick, Toast are not allowed due to pressing Shift-Ctrl-O, it cleared the necessary file.
It worked before, and I donโt know what I did to make it no longer work. Any help would be greatly appreciated. I cleaned up the project, restarted eclipse ... to no avail.
final Button button=(Button) findViewById(R.id.button); button.setOnClickListener(new OnClickListener() { public void onClick(View v) {
Thank you very well in advance.
source share