出现故障:System services not available to Activities before onCreate()故障原因:系统服务需要在Activity被激活后才能使用,因此在需要用到系统服务的时候,应该把代码放入onCreate方法中