Search code examples
androidandroid-studioandroid-studio-2.1

Missing import after semicolon (Android studio 2.1)


When i am writing line: import android.bluetooth.BluetoothAdapter; in the android studio,

The above line gets disappear as soon as i hit enter after the semicolon.

Could it be due to line: import android.support.v7.app.AppCompatActivity;

And when the TextView import line disappears,also there is no + sign hence there is definitely no line folding. Please propose some solution to help me as I couldn't find any solution online. Is frustrating.


Solution

  • Go to Settings > Editor > General > Auto Import

    Uncheck Optimize import on the Fly