Android Studio. Can't include external library properly

前端 未结 3 1440
别那么骄傲
别那么骄傲 2021-01-12 09:31

I\'m trying to add to classpath external library (this one). The way I do it: File -> Project Structure -> Dependencies tab -> Add file dependency. Is

相关标签:
3条回答
  • 2021-01-12 10:11

    I fixed it by using exclude option in app/build.gradle, it works fine now.

    dependencies {
        .....
        compile ('com.thoughtworks.xstream:xstream:1.4.7'){
            exclude group: 'xmlpull'
        }
    }
    
    0 讨论(0)
  • 2021-01-12 10:16

    How to add external libraries into Android Studio:

    • change Project View from Android to Project.
    • add the external library into the directory of "libs" of the project you want put the jar file into.
    • select the "libs/xxx.jar" and right-click, select "Add as a library".

    Then check dependencies of build.gradle, you will find jar file is added successfully.

    0 讨论(0)
  • 2021-01-12 10:23

    xml pull parser is a part of android framework, remove xmlpull-1.1.3.1.jar and try It might work.

    0 讨论(0)
提交回复
热议问题