Skip to content Skip to sidebar Skip to footer

The Android Studio Instantly Remove My Copy & Paste Import Statement

i've a project (blank activity) set up by android studio 0.8x, but when i paste (ctrl + v) some import statement like the following import android.app.Activity; import android.cont

Solution 1:

You can control the behaviour in Settings, Editor, Auto-Import. It is the "optimize imports on the fly" setting

However, I would recommend to start writing your code, Android Studio will highlight the classes you have not yet imported and then you can add the necessary imports by simply typing Alt+Enter


Solution 2:

when you import any file and immediate remove just follow below step in android studio and change this setting ...

  1. press shift key two times continuously it will open search everywhere box
  2. Type Auto import in this box. and result show auto import,click on this.
  3. There is one option Optimize imports on the fly under the name JAVA,in your case it is checked..unchecked it and your problem will be solved.

Post a Comment for "The Android Studio Instantly Remove My Copy & Paste Import Statement"