Either:
Increase your
android:minSdkVersion
to 9, orDon't use
AlarmClock
at all, orCheck
Build.VERSION.SDK_INT
to see if you are onBuild.VERSION_CODES.GINGERBREAD
or higher, and only useAlarmClock
on devices where this is true (then add theTargetApi(Build.VERSION_CODES.GINGERBREAD
) annotation to the method where you are usingAlarmClock
to get rid of the error message)
AlarmClock
itself was only added in API Level 9, and therefore cannot be used on API Level 8 or below.