title: Program type already present: com.folder.servicehelper.BuildConfig
body: <p>I am developing an Android library. So, I have a module that will be the .aar file.</p>
  
  <p>This is the Graddle file of this module:</p>
  
  <pre><code>apply plugin: 'com.android.library'
  
  android {
  compileSdkVersion 28
  
  
  
  defaultConfig {
      minSdkVersion 16
      targetSdkVersion 28
      versionCode 1
      versionName "1.0"
      multiDexEnabled true
      testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
  
  }
  
  buildTypes {
      release {
          minifyEnabled false
          proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
      }
  }
  
  }
  
  dependencies {
  implementation fileTree(include: ['*.jar', '*.aar'], dir: 'libs')
  implementation 'com.esri.arcgis.android:arcgis-android:10.2.9'
  implementation 'com.squareup.okhttp3:okhttp:3.11.0'
  implementation 'com.android.support:appcompat-v7:28.0.0-rc02'
  implementation (name:'offending_library_2.0.0', ext:'aar')
  testImplementation 'junit:junit:4.12'
  androidTestImplementation 'com.android.support.test:runner:1.0.2'
  androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
  }
  </code></pre>
  
  <p>Aside, I have another module (app module) which I use to test this library, asa  dummy app. I have that library loaded here too, since if I don`t have it it will not compile, This is the Graddle of the app module:</p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
  compileSdkVersion 28
  defaultConfig {
      applicationId "com.my.company.domain"
      minSdkVersion 16
      targetSdkVersion 28
      versionCode 1
      versionName "1.0"
      testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
  }
  packagingOptions{
      exclude 'META-INF/LGPL2.1'
      exclude 'META-INF/LICENSE'
      exclude 'META-INF/NOTICE'
  }
  buildTypes {
      release {
          minifyEnabled false
          proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
      }
  }
  }
  
  dependencies {
  implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
  implementation 'com.esri.arcgis.android:arcgis-android:10.2.9'
  implementation 'com.squareup.okhttp3:okhttp:3.11.0'
  implementation 'com.android.support:appcompat-v7:28.0.0-rc02'
  implementation 'com.android.support.constraint:constraint-layout:1.1.3'
  implementation (name:'offending_library_2.0.0', ext:'aar')
  implementation project (':arcgislibrary')&lt;----- This is the other module
  testImplementation 'junit:junit:4.12'
  androidTestImplementation 'com.android.support.test:runner:1.0.2'
  androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
  }
  </code></pre>
  
  <p>This way, I am having the error Program type already present: com.folder.servicehelper.BuildConfig
  Message{kind=ERROR, text=Program type already present: com.folder.servicehelper.BuildConfig, sources=[Unknown source file], tool name=Optional.of(D8)}</p>
  
  <p>The BuildConfig class is inside the offending_library of my graddle files.</p>
  
  <p>I tried to delete the .aar file of the libs folder of the app module, but that way it doesn't compiles. Tried to do</p>
  
  <pre><code>implementation (name:'offending_library_2.0.0', ext:'aar'){
      exclude group:'com.folder.servicehelper'
  }
  </code></pre>
  
  <p>but the result is the same.</p>
  
  <p>Any idea of how could I get rid of that error?</p>
  
  <p>Thank you.</p>