Why do I get an InstantiationException if I try to start a service? [duplicate]

You service needs to have a public no-args constructor. Otherwize, Android will not be able to instantiate it.

So replace

public StatisticsWidgetUpdateService(String name) {
    super(name);
}

with

public StatisticsWidgetUpdateService() {
    super("SOME NAME");
}

Leave a Comment