Missing the android.os.handler object from Android Studio

b1kjsh picture b1kjsh · Jun 15, 2013 · Viewed 20.9k times · Source

I'm attempting to create a Handler thread in my application however Android Studio marks my text as red and will only attempt to import the java.util version of a handler and not the Android SDK version. When attempting to import manually I'm able to find the HandlerThread just fine but the normal handler import seems to be missing.

Any ideas why?

Answer

b1kjsh picture b1kjsh · Jun 17, 2013

I had to add import android.os.*; before I could get the android.os.Handler object working in my class.