Mistake

Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'. > More than one file was found with OS independent path 'META-INF/DEPENDENCIES' 

gradle:

  dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'com.android.support:appcompat-v7:26.1.0' implementation 'com.android.support:design:26.1.0' implementation 'com.android.support.constraint:constraint-layout:1.0.2' testImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test:runner:1.0.1' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1' // https://mvnrepository.com/artifact/com.google.code.gson/gson compile 'com.google.code.gson:gson:2.8.2' // https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.3' } 

compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.3' swears enter image description here

    2 answers 2

    You compiler writes (yellow inscription)

    That HttpClient conflicts with any package from the android library. You can resolve this conflict using HttpUrlConnection or OkHttp .

      It turned out to be solved by removing the Apache dependency and adding the following

       compile group: 'cz.msebera.android' , name: 'httpclient', version: '4.4.1.1' // https://mvnrepository.com/artifact/commons-codec/commons-codec compile group: 'commons-codec', name: 'commons-codec', version: '1.9'