I am using Android Studio 2.2.2; and "Optimize imports on the fly . "
The problem is that I am using the resource without its package; e.g. sampleString instead of R.string.sampleString
Android Studio adds below import
import static com.abRstring.sampleString;
This problem also occurs when creating a new action, Android Studio imports some random resource into a new created class.
import static com.abrandompackage.R;
I can solve this problem by unchecking the " Optimize imports on the fly " box, but I want it to be checked. Is there any other solution to remove these annoying imported goods?
Thanks.
My auto import options: 
source share