Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

I used Picasso as dependency for both the my App project and the chat library

Here is the error I'm facing while compiling the code:

Program type already present: org.apache.http.auth.AuthSchemeFactory Message{kind=ERROR, text=Program type already present:

org.apache.http.auth.AuthSchemeFactory, sources=[Unknown source file], tool name=Optional.of(D8)}

so how to use same dependency for two project?

---- Root project----  
                    ---app
                    ---chat library

EDIT Saturday - 2018 14 April

in app>libs folder the following jar files exist:

  • httpclient-4.3.6
  • httpcore-4.3.3
  • httpmime-4.3.6
  • I had have the same issue. As the first you can see that a new dexer called D8 is running. It seems to be still experimental so you can switch it off temporally in gradle.properties file by:

    android.enableD8=false
    

    See more details about D8 in a blog announcement

    Then you can see more detailed error message which led me to following solution:

    implementation("org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:1.0.1") {
        exclude group: 'org.apache.oltu.oauth2', module: org.apache.oltu.oauth2.common'
                    The option 'android.enableD8' is deprecated and should not be used anymore. Use 'android.enableD8=true' to remove this warning. It will be removed in AGP version 3.3.
    – MeLean
                    Sep 11, 2018 at 13:48
            

    Thanks for contributing an answer to Stack Overflow!

    • Please be sure to answer the question. Provide details and share your research!

    But avoid

    • Asking for help, clarification, or responding to other answers.
    • Making statements based on opinion; back them up with references or personal experience.

    To learn more, see our tips on writing great answers.