0

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.

Qzee
  • 15
  • 1
  • 6

3 Answers3

2

to import any class you should use like this

import root.subroot.classname; 

here you are making a mistake import.name;

change

import.android.bluetooth.BluetoothAdapter;

to

import android.bluetooth.BluetoothAdapter;

Sadiq Md Asif
  • 882
  • 6
  • 18
0

Its because you haven't used any object of bluetooth adapter instatiate a object of that class and it will automatically be visible... fading of import statement means its redundant

  • Hi, how to add the object of the class. It appears that everything is reduncant because nothing can be added. After semicolon everything disappears. – Qzee Dec 28 '16 at 07:25
0

Go to Settings > Editor > General > Auto Import

Uncheck Optimize import on the Fly

Sadiq Md Asif
  • 882
  • 6
  • 18