-1

I was developing a android application. My configuration are given below:

  • minimum sdk version in 4.4.4
  • Build tools version =25.0.0

I am adding some addtional third party library as library module to my project and added as dependency in my main module.

In that library module they are using build tool as 25.0.3. So gradle build failed.

I need to update build tool in my main project and download the latest build tools which is greater than library module build tools? or I need to give the build tool version as 25.0.3 (same as library module) in my main project?

ישו אוהב אותך
  • 28,609
  • 11
  • 78
  • 96
SIVAKUMAR.J
  • 4,258
  • 9
  • 45
  • 80
  • change library module to lower version, if compile time error not happen leave as it. Else you have to change your main module to higher version. – Lingeshwaran Mar 16 '18 at 11:28
  • Sorry ( Lingeshwaran )im not able to understand your point.Please explain with examples – SIVAKUMAR.J Mar 16 '18 at 11:29

1 Answers1

1

The problem is not because of your buildToolsVersion, but it is because of your library or support library version which is not using the same version with the third library.

You need to make your main project and your module library dependency (in dependencies block) using the same version. If your third party library using version 25.0.3, you need to use the same. Or alternatively, you can exclude the library which is included in the third library. For example, if your third party is implicitly using support library appcompat and design, you can exclude it with:

implementation ("com.package.thirdparty:library:1.1.0") {
    exclude group: 'com.android.support'
    exclude module: 'appcompat-v7'
    exclude module: 'design'
}
ישו אוהב אותך
  • 28,609
  • 11
  • 78
  • 96