Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Missing the android.os.handler object from Android Studio

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?

like image 306
b1kjsh Avatar asked Jun 15 '13 07:06

b1kjsh


2 Answers

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

like image 70
b1kjsh Avatar answered Oct 18 '22 17:10

b1kjsh


Just import android.os.Handler, no need to import everything in android.os

like image 34
Peizhong Ju Avatar answered Oct 18 '22 18:10

Peizhong Ju