5
E/AndroidRuntime(27856): java.lang.RuntimeException: Unable to instantiate receiver com.inc.statusbar.Statusbar$DeviceAdminSampleReceiver: java.lang.InstantiationException: can't instantiate class com.inc.statusbar.Statusbar$DeviceAdminSampleReceiver; no empty constructor

我已经尝试调用类的默认构造函数DeviceAdminReceiver但无济于事。删除构造函数也会给出相同的错误。 DeviceAdminSampleReceiver类定义 -

public class DeviceAdminSampleReceiver extends DeviceAdminReceiver
{

    public DeviceAdminSampleReceiver()
    {
        super();    
    }

    @Override
    public void onEnabled(Context context, Intent intent) {
        super.onEnabled(context, intent);
    }

    @Override
    public CharSequence onDisableRequested(Context context, Intent intent) {
        super.onDisabled(context, intent);
        return "admin_receiver_status_disable_warning";
    }

    @Override
    public void onDisabled(Context context, Intent intent) {
        super.onDisabled(context, intent);
    }

}
4

0 回答 0