IllegalStateException: WorkManager is already initialized
问题 Having these dependencies: dependencies { implementation "androidx.work:work-runtime:2.0.1" androidTestImplementation "androidx.work:work-testing:2.0.1" } When running this code for the second time: Configuration config = new Configuration.Builder().build(); WorkManager.initialize(getApplicationContext(), config); this.workManager = WorkManager.getInstance(); I get this error message: java.lang.IllegalStateException: WorkManager is already initialized. Did you try to initialize it manually