androidx.work.impl.WorkManagerInitializer: java.lang.ClassNotFoundException: "androidx.work.impl.WorkManagerInitializer" on path: /data/app/app-2.apk

Problem was caused by multiDexEnabled true which I had in defaultConfig for unknown reasons. I found it out after some digging and an issue


I have the same problem in Androd 19

Reading this and this I solved using

Gradle:

multiDexEnabled true

Java:

public class MyApp extends Application {

@Override
protected void attachBaseContext(Context base) {
    super.attachBaseContext(base);
    MultiDex.install(this);
}