唤醒广播接收者无法解析为类型
我的项目显示错误消息.我抬起头来,寻找我能想到的所有可能的原因。我已经设定了和的路径。即使我的mapView也可以工作(如果我在代码下面注释),这意味着可以正确添加到项目中。WakefulBroadcastReceiver cannot be resolved to a type
android-support-library
google play services
google play service
public class GcmBroadcastReceiver extends WakefulBroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
// Explicitly specify that GcmIntentService will handle the intent.
ComponentName comp = new ComponentName(context.getPackageName(),
GcmIntentService.class.getName());
// Start the service, keeping the device awake while it is launching.
startWakefulService(context, (intent.setComponent(comp)));
setResultCode(Activity.RESULT_OK);
}
}
任何想法为什么这给错误?