What's the difference between principles of useLibrary and compile files('') in build.gradle?

前端 未结 1 1642
面向向阳花
面向向阳花 2021-01-02 19:45

After Android 6.0 releases, Support for the Apache HTTP client is removed. If our app is using this client and targets Android 2.3 (API level 9) or

相关标签:
1条回答
  • 2021-01-02 20:43

    useLibrary adds the library to classpath while compiling but does not bundle the library with the application.

    compile dependencies are in classpath at compile time and additionally they get shipped with your APK.

    For the Apache HttpClient support, use useLibrary when compiling with SDK 23+. The library is already there in the target platform. It is just not there in the compile SDK.

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