可以运行的,,,在AndroidManifest.xml中配置Services 和 Broadcast,   不知道你的错误是什么。

解决方案 »

  1.   

     Intent sIntent = new Intent(***.this, Service.class);
      

  2.   

    楼主是跳转不成功吧?中间加入一句:
    dateTimeIntent .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); 

    Intent dateTimeIntent = new Intent(context, DateTimeSyncService.class);
    dateTimeIntent .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); 
    context.startService(dateTimeIntent);这样就可以成功跳转,但这个setFlags的作用,我到现在还不是特别明白,还望高人指点