title: Android Work Manager: "Could not instantiate Worker"
body: <p>I've followed the <a href="https://developer.android.com/topic/libraries/architecture/workmanager/basics#workflow" rel="noreferrer">Android Developer's</a> tutorial on using the Worker Manager structure to run my code in background but anytime I try to enqueue my worker it doesn't run and I get the following error:</p>
  
  <pre><code>2018-10-04 22:25:47.004 28669-28885/app.package.com.debug E/DefaultWorkerFactory: Could not instantiate app.package.com.MyWorker
      java.lang.NoSuchMethodException: &lt;init&gt; []
          at java.lang.Class.getConstructor0(Class.java:2320)
          at java.lang.Class.getDeclaredConstructor(Class.java:2166)
          at androidx.work.DefaultWorkerFactory.createWorker(DefaultWorkerFactory.java:58)
          at androidx.work.impl.WorkerWrapper.runWorker(WorkerWrapper.java:180)
          at androidx.work.impl.WorkerWrapper.run(WorkerWrapper.java:117)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
          at java.lang.Thread.run(Thread.java:764)
  2018-10-04 22:25:47.005 28669-28885/app.package.com.debug E/WorkerWrapper: Could for create Worker app.package.com.MyWorker
  </code></pre>
  
  <p>I've seen that this problem could be related to the default constructor on the worker but I already use the correct one instead of the deprecated default function.</p>
  
  <p>My worker is declared as:</p>
  
  <pre><code>public class MyWorker extends Worker {
  
      public MyWorker(@NonNull Context context, @NonNull WorkerParameters workerParams) {
          super(context, workerParams);
      }
  
      @NonNull
      @Override
      public Result doWork() {
          // Doesn't even get called
      }
  }
  </code></pre>
  
  <p>And it gets queued like so:</p>
  
  <pre><code>WorkManager workManager = WorkManager.getInstance();
  if (myWorkerRequest == null) {
      myWorkerRequest = new OneTimeWorkRequest.Builder(MyWorker.class)
              .setConstraints(new Constraints.Builder()
                      .setRequiredNetworkType(NetworkType.CONNECTED)
                      .build())
              .build();
  }
  WorkStatus workStatus = workManager.getStatusById(myWorkerRequest.getId()).getValue();
  if (workStatus == null || !workStatus.getState().isFinished()) {
      workManager.enqueue(myWorkerRequest);
  }
  </code></pre>
  
  <p>I'm not seeing anything different from the examples so I'd like to understand what else could affect my code to cause this crash. Could it be something ProGuard related?</p>
  
  <p>My version is <code>1.0.0-alpha09</code></p>
  
  <p>Thanks!</p>