Skip to content

WorkManager init conflict error #81

@mmw-andreig

Description

@mmw-andreig

After implementing ExponeaSDK there is an error with initialisation of ContentWorker that was used in the app, before the SDK implementation.
From what I see, SDK also uses the WorkManager dependency..
In case I comment Exponea.init(context, configuration), there is no issue at all.

From what I see, it's not recommended to use WorkManager.initialize(context, configuration) directly, and that was found in the source code.

What do you think? Is this something that you can fix on your end?

Could not instantiate com.myapp.app.content_synchronizer.ContentWorker
                                                                                                    java.lang.NoSuchMethodException: com.myapp.app.content_synchronizer.ContentWorker.<init> [class android.content.Context, class androidx.work.WorkerParameters]
                                                                                                    	at java.lang.Class.getConstructor0(Class.java:3395)
                                                                                                    	at java.lang.Class.getDeclaredConstructor(Class.java:3077)
                                                                                                    	at androidx.work.WorkerFactory.createWorkerWithDefaultFallback(WorkerFactory.java:94)
                                                                                                    	at androidx.work.impl.WorkerWrapper.runWorker(WorkerWrapper.java:243)
                                                                                                    	at androidx.work.impl.WorkerWrapper.run(WorkerWrapper.java:144)
                                                                                                    	at androidx.work.impl.utils.SerialExecutorImpl$Task.run(SerialExecutorImpl.java:96)
                                                                                                    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
                                                                                                    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
                                                                                                    	at java.lang.Thread.run(Thread.java:1012)
WM-WorkerWrapper        com.myapp.app.sandbox        E  Could not create Worker com.myapp.app.content_synchronizer.ContentWorker

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions