title: Program type already present: android.support.v4.media.MediaBrowserCompat$ConnectionCallback$StubApi21
body: <p>Received this error after updating android to preview p and adding material design library. refactored to suggested androidx namespaces. </p>
  
  <p>here is my app.gradle file</p>
  
  <p>apply plugin: 'kotlin-android' 
  apply plugin: 'io.fabric' 
  apply plugin: 'com.android.application'</p>
  
  <pre><code>buildscript {
  repositories {
      maven { url 'https://maven.fabric.io/public' }
  }
  
  dependencies {
      classpath 'io.fabric.tools:gradle:1.25.4'
  }
  </code></pre>
  
  <p>}</p>
  
  <pre><code>android {
  lintOptions {
      checkReleaseBuilds false;
      abortOnError false
  }
  
  compileSdkVersion 'android-P'
  useLibrary 'org.apache.http.legacy'
  
  defaultConfig {
      applicationId "datazeo.android.dzreader"
      minSdkVersion 21
  
      targetSdkVersion 27
  
  }
  
  buildTypes {
      release {
          minifyEnabled false
          proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
      }
  }
  </code></pre>
  
  <p>}</p>
  
  <pre><code>repositories {
  mavenCentral()
  
  maven {
      url 'https://maven.fabric.io/public'
  }
  </code></pre>
  
  <p>}</p>
  
  <pre><code>dependencies {
  implementation 'com.google.firebase:firebase-crash:15.0.2'
  implementation 'com.google.firebase:firebase-core:15.0.2'
  implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
  implementation 'org.jetbrains.anko:anko-common:0.9'
  implementation 'com.commit451:PhotoView:1.2.4'
  implementation('com.crashlytics.sdk.android:crashlytics:2.9.1') {
      transitive = true;
  
  }
  implementation 'com.google.android.material:material:1.0.0-alpha1'
  implementation 'androidx.appcompat:appcompat:1.0.0-alpha1'
  implementation 'androidx.legacy:legacy-support-v4:1.0.0-alpha1'
  implementation 'androidx.legacy:legacy-support-core-utils:1.0.0-alpha1'
  </code></pre>
  
  <p>}</p>
  
  <pre><code>apply plugin: 'com.google.gms.google-services'
  </code></pre>