Getting 'app:transformClassesWithDexForDebug' error on compiling the project having useLibrary 'org.apache.http.legacy' in build.gradle

前端 未结 5 1787
悲&欢浪女
悲&欢浪女 2021-01-18 11:40

I\'m developing an app in which I\'m using this library.

On compiling the project, this error containing TransformException and RuntimeException<

5条回答
  •  粉色の甜心
    2021-01-18 12:02

    Pull exclude out of the dependencies section and put in configurations. e.g.

    dependencies {
        ...
        compile 'org.apache.httpcomponents:httpclient-android:4.3.5.1'
        compile 'org.apache.httpcomponents:httpmime:4.3.5'
        ...
    }
    
    configurations {
        all*.exclude group: 'org.apache.httpcomponents',module: 'httpclient'
    }
    

提交回复
热议问题