Program type already present: com.squareup.okhttp.Address

前端 未结 2 432
深忆病人
深忆病人 2021-01-20 03:10

I am trying to configure my android app to use Firebase Cloud Firestore. I also have dependencies on OKHttp3. Gradle will sync fine but I am unable to compile the app and ru

2条回答
  •  无人及你
    2021-01-20 03:59

    FIXED

    It turned out the problem was not related to OkHttp - it was related to the Dexer compiler in the new version of android studio (3.0.0 and above) Going into the gradle.properties file and adding this line:

    android.enableD8=false
    

    solved my problem. The app now compiles normally

    EDIT

    The comments are right - you should NOT do this. The problem turned out to be that the project had gradle dependencies conflicting with .jar files manually imported. If you do have this problem, check if you've not got:

    1. Different versions of the same library imported by different modules in Gradle
    2. Jar file of a library you're also importing with Gradle

提交回复
热议问题