commons-logging defines classes that conflict with classes now provided by Android after Android Studio Update

前端 未结 8 1904
别跟我提以往
别跟我提以往 2020-12-01 13:34

I have updated Android Studio to version 3 and now seems unable to compile my project previously compiled without errors.

The error message is the follow

8条回答
  •  时光说笑
    2020-12-01 14:00

    You should replace "compile" with "implementation" as it's deprecated in the latest gradle and exlude "org.apache.httpcomponents" from Google api client libraries:

    implementation('com.google.api-client:google-api-client-android:1.23.0') {
        exclude group: 'org.apache.httpcomponents'
    }
    implementation('com.google.http-client:google-http-client-gson:1.23.0') {
        exclude group: 'org.apache.httpcomponents'
    }
    

    this solution was found here: https://developers.google.com/google-apps/activity/v1/quickstart/android

提交回复
热议问题