title: Program type already present: android.media.VisibleImage error when I am Using Unity library (With ARCore) in Android native project (With ARCore)
body: <p>I'm trying to build an app using ARcore. Everything worked fine, but I can't implement some requirements in Android Native app, so we chosen Unity for that. We have implemented ARCore in Unity library Project. Then we have implemented that Unity library project into the Android basic app(Native app without ARCore). It worked fine, but If I am implementing unity library project in Native Android project with ARCore I am getting a conflict error.</p>
  
  <p>This is my app dependency :</p>
  
  <pre><code>dependencies {
      // ARCore library
      implementation 'com.google.ar:core:1.1.0'
  
      // Obj - a simple Wavefront OBJ file loader
      // https://github.com/javagl/Obj
      implementation 'de.javagl:obj:0.2.1'
      implementation project(':unity_ar_library')
      implementation 'com.android.support:appcompat-v7:27.1.1'
      implementation 'com.android.support:design:27.1.1'
      implementation 'com.android.support.constraint:constraint-layout:1.1.0'
  
      implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
  }
  </code></pre>
  
  <p>This is unity Library dependency :</p>
  
  <pre><code> implementation fileTree(dir: 'libs', include: ['*.jar'])
      implementation project(':arcore_client')
      implementation project(':google_ar_required')
      implementation project(':unitygar')
      implementation project(':unityandroidpermissions') 
  </code></pre>
  
  <p>I am getting this error :</p>
  
  <pre><code>Program type already present: android.media.VisibleImage$Plane
  Message{kind=ERROR, text=Program type already present: android.media.VisibleImage$Plane, sources=[Unknown source file], tool name=Optional.of(D8)}
  
  Caused by: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: E:\AR_New\arcore-android-sdk-master\samples\hello_ar_java\app\build\intermediates\transforms\dexBuilder\debug\32, E:\AR_New\arcore-android-sdk-master\samples\hello_ar_java\app\build\intermediates\transforms\externalLibsDexMerger\debug\0, E:\AR_New\arcore-android-sdk-master\samples\hello_ar_java\app\build\intermediates\transforms\dexBuilder\debug\26.jar, E:\AR_New\arcore-android-sdk-master\samples\hello_ar_java\app\build\intermediates\transforms\dexBuilder\debug\27.jar, E:\AR_New\arcore-android-sdk-master\samples\hello_ar_java\app\build\intermediates\transforms\dexBuilder\debug\29.jar, E:\AR_New\arcore-android-sdk-master\samples\hello_ar_java\app\build\intermediates\transforms\dexBuilder\debug\30.jar, E:\AR_New\arcore-android-sdk-master\samples\hello_ar_java\app\build\intermediates\transforms\dexBuilder\debug\31.jar
  
  Caused by: com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: E:\AR_New\arcore-android-sdk-master\samples\hello_ar_java\app\build\intermediates\transforms\dexBuilder\debug\32, E:\AR_New\arcore-android-sdk-master\samples\hello_ar_java\app\build\intermediates\transforms\externalLibsDexMerger\debug\0, E:\AR_New\arcore-android-sdk-master\samples\hello_ar_java\app\build\intermediates\transforms\dexBuilder\debug\26.jar, E:\AR_New\arcore-android-sdk-master\samples\hello_ar_java\app\build\intermediates\transforms\dexBuilder\debug\27.jar, E:\AR_New\arcore-android-sdk-master\samples\hello_ar_java\app\build\intermediates\transforms\dexBuilder\debug\29.jar, E:\AR_New\arcore-android-sdk-master\samples\hello_ar_java\app\build\intermediates\transforms\dexBuilder\debug\30.jar, E:\AR_New\arcore-android-sdk-master\samples\hello_ar_java\app\build\intermediates\transforms\dexBuilder\debug\31.jar
  
  com.android.tools.r8.CompilationFailedException: Compilation failed to complete 
  
  com.android.tools.r8.utils.AbortException   
  </code></pre>
  
  <p>You can tell me if there is anything else to add to understand what I'm doing or where I'm wrong.</p>
  
  <p>I have tried to change Android support libraries version but it didn't help.</p>
  
  <p>If I remove Unity project, my native ARCore project is working. If 
   I am using Unity Library AR core project in another native android app (Without ARCore)it is working fine.</p>