title: Error:Program type already present: android.arch.lifecycle.LiveData
body: <p>When I press the run button in Android Studio, my app compiles but shows this error (redacted):</p>
  
  <pre class="lang-none prettyprint-override"><code>Error:Program type already present: android.arch.lifecycle.LiveData
  </code></pre>
  
  <p><a href="https://pastebin.com/wS4nxXBu" rel="nofollow noreferrer">(Full log)</a></p>
  
  <p>I've tried deleting the <code>.gradle</code> folder, then going to <code>Build &gt; Clean Project</code> and <code>Build &gt; Rebuild Project</code>. However, it doesn't work. I've also tried deleting the source code, then cloning again from <code>git</code> and importing the folder to Android Studio. However, it still produces that error.</p>
  
  <p>Here's my app's <code>app/build.gradle</code>:</p>
  
  <pre class="lang-groovy prettyprint-override"><code>apply plugin: 'com.android.application'
  
  android {
      compileSdkVersion 27
      buildToolsVersion '27.0.3'
      defaultConfig {
          applicationId "com.edricchan.studybuddy"
          minSdkVersion 24
          targetSdkVersion 27
          versionCode 8
          versionName "1.0.0-rc.503"
          testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
          resConfigs "en"
          multiDexEnabled true
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
      dataBinding {
          enabled = true
      }
  }
  
  dependencies {
      implementation 'com.android.support:support-v4:27.1.0'
      implementation 'com.android.support:support-annotations:27.1.0'
      implementation fileTree(dir: 'libs', include: ['*.jar'])
      androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
          exclude group: 'com.android.support', module: 'support-annotations'
      })
      implementation 'com.android.support:appcompat-v7:27.1.0'
      implementation 'com.android.support.constraint:constraint-layout:1.0.2'
      implementation 'com.android.support:design:27.1.0'
      implementation 'com.android.support:cardview-v7:27.1.0'
      testImplementation 'junit:junit:4.12'
      // Firebase stuff
      implementation 'com.google.firebase:firebase-storage:11.8.0'
      implementation 'com.google.firebase:firebase-firestore:11.8.0'
      implementation 'com.google.firebase:firebase-auth:11.8.0'
      implementation 'com.google.firebase:firebase-messaging:11.8.0'
      implementation 'com.google.android.gms:play-services-auth:11.8.0'
      implementation 'com.firebaseui:firebase-ui-auth:3.1.0'
      implementation 'com.firebaseui:firebase-ui-firestore:3.1.0'
      implementation 'com.firebaseui:firebase-ui-storage:3.1.0'
      // Provide a way to update the app
      implementation 'com.github.javiersantos:AppUpdater:2.6.4'
      // Chrome Custom Tabs
      implementation 'com.android.support:customtabs:27.1.0'
      // The app's intro screen
      implementation 'com.heinrichreimersoftware:material-intro:1.6.2'
      // Use for new Material Text field boxes recently introduced
      implementation 'com.github.HITGIF:TextFieldBoxes:1.3.7'
      // Report an issue to Github without having to open a new tab and so on...
      implementation 'com.heinrichreimersoftware:android-issue-reporter:1.3.1'
  }
  apply plugin: 'com.google.gms.google-services'
  </code></pre>