Montag, 7. November 2016

Multi dex requires Build Tools 21.0.0 / Current: 20

When trying to launch the sample app from https://github.com/pedrovgs/DraggablePanel, I encountered the issue:

 Multi dex requires Build Tools 21.0.0 / Current: 20

What is this error about?

In this case, the parent DraggablePanel project had gradle.properties defined, that were referring to an older SDK version:

ANDROID_BUILD_TOOLS_VERSION=21.0.0
ANDROID_COMPILE_SDK_VERSION=20


The sample project itself used those values inside the build.gradle file:

defaultConfig {
  versionName project.VERSION_NAME
  versionCode Integer.parseInt(project.VERSION_CODE)

  targetSdkVersion Integer.parseInt(project.ANDROID_TARGET_SDK_VERSION)
}

Changing the versions fixed the issue.

ANDROID_BUILD_TOOLS_VERSION=22.0.1
ANDROID_COMPILE_SDK_VERSION=21