title: Default interface methods are only supported starting with Android 7.0 (Nougat)
body: <p>I upgraded to Android Studio 3.1 and I'm getting the following error:</p>
  <blockquote>
  <p>Default interface methods are only supported starting with Android N (--min-api 24): void android.arch.lifecycle.DefaultLifecycleObserver.onCreate(android.arch.lifecycle.LifecycleOwner) <br />
  <br />
  Message{kind=ERROR, text=Default interface methods are only supported starting with Android N (--min-api 24): void android.arch.lifecycle.DefaultLifecycleObserver.onCreate(android.arch.lifecycle.LifecycleOwner), sources=[Unknown source file], tool name=Optional.of(D8)}</p>
  </blockquote>
  <p><a href="https://i.stack.imgur.com/Nof2r.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Nof2r.png" alt="Error" /></a></p>
  <p>Here is my Gradle configuration:</p>
  <pre><code>compileSdkVersion 27
  //buildToolsVersion '27.0.3'
  defaultConfig {
      minSdkVersion 16
      targetSdkVersion 27
       multiDexEnabled true
       //...
     }
  </code></pre>
  <p>As you can see, I am targeting 27 which is already ahead of 24 that it's complaining about. What exactly should I do to fix this? If I change to 1.8 Java, won't I be missing a lot of customers? Why was I not getting this error before I upgraded Android Studio?</p>
  <p>I do not know if this is about the LifecycleObserver class I recently put in. It was in Kotlin and now I changed it to Java, but I still get the same error after cleaning the project:</p>
  <pre class="lang-java prettyprint-override"><code>public class LifeCycleAwareObserver implements LifecycleObserver {
  
      @OnLifecycleEvent(Lifecycle.Event.ON_STOP)
      public void  onAppBackgrounded() {
          AnalyticsUtils.trackStartSession(true);
      }
  
      @OnLifecycleEvent(Lifecycle.Event.ON_START)
      public void onAppForegrounded() {
          AnalyticsUtils.trackStartSession(false);
      }
  }
  </code></pre>
  <p>How can I trace where the error is coming from so I can fix it?</p>
  <p>Here are my version dependencies:</p>
  <pre><code>project.ext {
  
          firebase_version = '12.0.0'
  
          supportlib_version = '27.0.2'
  
          room_version = '1.0.0'
  
          espresso_version = '3.0.1'
  
          archLifecycleVersion = '1.1.1'
      }
  </code></pre>