title: Error: transformDexArchiveWithExternalLibsDexMergerForDebug FAILED
body: <p>I am trying to develop an SFTP client using sshj on Android studio such that the App can connect securely to the server using  SFTP over ssh. The code was running fine, but when I added the &quot;sshj-0.10.0&quot; module, it gives me this complicated error.</p>
  <p><a href="https://i.stack.imgur.com/kDqrI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kDqrI.png" alt="enter image description here" /></a></p>
  <p>The &quot;sshj-0.10.0&quot; module is needed to run server code using net library as below:</p>
  <pre><code>import net.schmizz.sshj.SSHClient;
  import net.schmizz.sshj.sftp.SFTPClient;
  </code></pre>
  <p>I added the module the project and configured it in the dependencies in build.gradel of the app as shown below:</p>
  <p><a href="https://i.stack.imgur.com/KRLQl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KRLQl.png" alt="enter image description here" /></a></p>
  <p><strong>What I have tried so far (but not limited to):</strong></p>
  <p>1- Clean Project then Rebuild Project - failed</p>
  <p>2- Invalidate Caches / Restart - failed</p>
  <p>3- Delete .gradle and .idea from my root project- failed</p>
  <p>4- Added</p>
  <pre><code>android {
      defaultConfig {
      multiDexEnabled true
        }
     }
  </code></pre>
  <p>and</p>
  <pre><code>dependencies {// Multidex
  implementation 'com.android.support:multidex:1.0.3'
  implementation project(path: ':sshj-0.10.0')
  }
  </code></pre>
  <p>No solution was worked with me.</p>
  <p><strong>Here is my build.gradle(:app)</strong></p>
  <pre><code>apply plugin: 'com.android.application'
  
   android {
      compileSdkVersion 28
       defaultConfig {
        applicationId &quot;com.example.mohsenali.autosen&quot;
      minSdkVersion 23
      targetSdkVersion 28
      versionCode 1
      versionName &quot;1.0&quot;
      testInstrumentationRunner &quot;android.support.test.runner.AndroidJUnitRunner&quot;
  
  }
  buildTypes {
      release {
          proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
         }
      }
     }
  
  
    android {
       defaultConfig {
      multiDexEnabled true
       }
     }
  
  
      dependencies {
         implementation fileTree(dir: 'libs', include: ['*.jar'])
         implementation 'com.android.support:appcompat-v7:28.0.0'
         implementation 'com.android.support.constraint:constraint-layout:2.0.2'
         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'
        //TedPermission
         implementation 'gun0912.ted:tedpermission:1.0.3'
         implementation files('D:/SKKU_PhD/Android/workspace_2018_projects/AutoSen/app/libs/commons-net-3.7.1.jar')
  // Multidex
         implementation 'com.android.support:multidex:1.0.3'
         implementation project(path: ':sshj-0.10.0')
  
         }
  </code></pre>
  <p>I know that this kind of error is popular but I tried many possible solutions available on SO since two days ago but none of them has helped me. <strong>So please don't mark it duplicated</strong>, maybe someone could help. Thanks.</p>