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);
}
}