Android 生成的IntentService内部出现空指针异常

Android 生成的IntentService内部出现空指针异常,android,android-intent,intentservice,android-annotations,Android,Android Intent,Intentservice,Android Annotations,我正在使用AndroidAnnotations,我有一些意向服务。我有时会遇到此错误(发生在所有服务上,而不仅仅是下面的服务): 但我无法检查Intent是否为null,因为DataLoaderService\uu已生成且不可编辑 我怎样才能解决这个问题 编辑:这是如何调用此服务的示例: DataLoaderService_.intent(MyApplication.getContext()).loadMyData().start(); 这就是服务(生成): @覆盖 处理内容上的公共无效(意图

我正在使用AndroidAnnotations,我有一些意向服务。我有时会遇到此错误(发生在所有服务上,而不仅仅是下面的服务):

但我无法检查Intent是否为null,因为
DataLoaderService\uu
已生成且不可编辑

我怎样才能解决这个问题

编辑:这是如何调用此服务的示例:

DataLoaderService_.intent(MyApplication.getContext()).loadMyData().start();
这就是服务(生成):

@覆盖
处理内容上的公共无效(意图){
DataLoaderService_u2;u.super.onHandleIntent(意图);
String action=intent.getAction();
if(动作\加载\我的\数据.equals(动作)){
super.loadMyData();
返回;
}
}
公共静态类IntentBuilder_
扩展ServiceIntentBuilder
{
公共DataLoaderService_u2;IntentBuilder_u2;loadMyData(){
动作(动作\加载\我的\数据);
归还这个;
}
}

您的意图有一个空值。 请改用此代码:

if (intent != null) {
 String action = intent.getAction();
        if (ACTION_LOAD_MY_DATA.equals(action)) {
            super.loadMyData();
            return ;
        }
    }

请发布调用此IntentService的代码。可能是@Ironman的重复。我知道如何在普通类中修复错误,但这是在生成的类中发生的。如何在无法更改的生成类中执行此操作?这就是我要问的。我不知道你的密码。那么,读这个:还有这个
@Override
    public void onHandleIntent(Intent intent) {
        DataLoaderService_.super.onHandleIntent(intent);
        String action = intent.getAction();
        if (ACTION_LOAD_MY_DATA.equals(action)) {
            super.loadMyData();
            return ;
        }
}

       public static class IntentBuilder_
            extends ServiceIntentBuilder<DataLoaderService_.IntentBuilder_>
        {
        public DataLoaderService_.IntentBuilder_ loadMyData() {
                    action(ACTION_LOAD_MY_DATA);
                    return this;
                }
    }
if (intent != null) {
 String action = intent.getAction();
        if (ACTION_LOAD_MY_DATA.equals(action)) {
            super.loadMyData();
            return ;
        }
    }