How Does Gradle Choose Between More Than 1 Versions Of The Same Library In A Gradle Tree?
Let say I have added Facebook and Twitter dependencies in my app. com.facebook.android:facebook-android-sdk:4.22.1 com.twitter.sdk.android:twitter:2.1.0 When i look at Gradle tre
Solution 1:
You can't have different versions of the same library inside an apk.
As you mentioned, by default, Gradle puts the newest one to the build. If you want to specify a concrete version of the library that should be used in your project, you can add a direct compile
(or implementation
/ api
for Android Gradle Plugin v3+) statement with a required version to get one.
Also, you can force version using a special syntax, but it can lead to some problems later. You can find more information about version conflicts resolution in this post
Post a Comment for "How Does Gradle Choose Between More Than 1 Versions Of The Same Library In A Gradle Tree?"