title: RuntimeException:ClassNotFoundException android.arch.lifecycle.ProcessLifecycleOwnerInitializer
body: <p>I am getting this error only on Android SDK &lt; 5.0. So 4.0, 4.2, 4.3 ect. Anything running Android 5.0+ works flawlessly. Any ideas? Crashes on launch.  </p>
  
  <p>Following this guide for setup -> <a href="https://developer.android.com/topic/libraries/architecture/adding-components.html" rel="noreferrer">https://developer.android.com/topic/libraries/architecture/adding-components.html</a></p>
  
  <p>App.java</p>
  
  <pre><code>public void onCreate() {
      super.onCreate();
  
      ProcessLifecycleOwner.get().getLifecycle().addObserver(new AppLifecycleListener(this));
      registerActivityLifecycleCallbacks(this);
  }
  </code></pre>
  
  <p>AppLifecycleListener.java</p>
  
  <pre><code>public class AppLifecycleListener implements LifecycleObserver {
  private App app;
  
  public AppLifecycleListener(App app)
  {
      this.app = app;
  }
  
  @OnLifecycleEvent(Lifecycle.Event.ON_START)
  public void onMoveToForeground() {
      if (app.getCurrentActivity() instanceof BaseActivity)
      {
          BaseActivity baseActivity = (BaseActivity) app.getCurrentActivity();
          baseActivity.runIsAPIVersionCheck();
          baseActivity.fetchObjectsWithHUD(false);
      }
  }
  
  @OnLifecycleEvent(Lifecycle.Event.ON_STOP)
  public void onMoveToBackground() {}
  </code></pre>
  
  <p>}</p>
  
  <p>Gradle</p>
  
  <pre><code>compileSdkVersion 26
  
  dexOptions {
      javaMaxHeapSize "4g"
  }
  
  defaultConfig {
      applicationId "app"
      minSdkVersion 16
      targetSdkVersion 26
      versionCode 71
      versionName "4.9.9"
      multiDexEnabled true
      resConfigs "en"
  
      javaCompileOptions {
          annotationProcessorOptions {
              includeCompileClasspath false
          }
      }
  
  compile 'com.android.support:appcompat-v7:26.1.0'
  compile 'com.android.support:support-v4:26.1.0'
  compile 'com.android.support:design:26.1.0'
  compile 'android.arch.lifecycle:extensions:1.1.0'
  compile 'android.arch.lifecycle:compiler:1.1.0'
  </code></pre>
  
  <blockquote>
    <p>02-28 20:54:03.151 2558-2558/? E/AndroidRuntime: FATAL EXCEPTION: main
                                                     java.lang.RuntimeException: Unable to get provider android.arch.lifecycle.ProcessLifecycleOwnerInitializer: java.lang.ClassNotFoundException: android.arch.lifecycle.ProcessLifecycleOwnerInitializer
                                                         at android.app.ActivityThread.installProvider(ActivityThread.java:4563)
                                                         at android.app.ActivityThread.installContentProviders(ActivityThread.java:4190)
                                                         at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4132)
                                                         at android.app.ActivityThread.access$1300(ActivityThread.java:130)
                                                         at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1255)
                                                         at android.os.Handler.dispatchMessage(Handler.java:99)
                                                         at android.os.Looper.loop(Looper.java:137)
                                                         at android.app.ActivityThread.main(ActivityThread.java:4745)
                                                         at java.lang.reflect.Method.invokeNative(Native Method)
                                                         at java.lang.reflect.Method.invoke(Method.java:511)
                                                         at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
                                                         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
                                                         at dalvik.system.NativeStart.main(Native Method)
                                                      Caused by: java.lang.ClassNotFoundException: android.arch.lifecycle.ProcessLifecycleOwnerInitializer
                                                         at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
                                                         at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
                                                         at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
                                                         at android.app.ActivityThread.installProvider(ActivityThread.java:4548)
                                                         at android.app.ActivityThread.installContentProviders(ActivityThread.java:4190) 
                                                         at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4132) 
                                                         at android.app.ActivityThread.access$1300(ActivityThread.java:130) 
                                                         at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1255) 
                                                         at android.os.Handler.dispatchMessage(Handler.java:99) 
                                                         at android.os.Looper.loop(Looper.java:137) 
                                                         at android.app.ActivityThread.main(ActivityThread.java:4745) 
                                                         at java.lang.reflect.Method.invokeNative(Native Method) 
                                                         at java.lang.reflect.Method.invoke(Method.java:511) 
                                                         at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786) 
                                                         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) 
                                                         at dalvik.system.NativeStart.main(Native Method) </p>
  </blockquote>