Observed package id 'build-tools;20.0.0' in inconsistent location
Asked Answered
M

4

19
  ./gradlew --parallel :app:assembleDebugTest

when i run above command in android studio terminal i got this error.

Error Parallel execution is an incubating feature. Observed package id 'build-tools;20.0.0' in inconsistent location 'sdk/build-tools/android-4.4W' (Expected 'sdk/build-tools/20.0.0')

Gradle file apply plugin: 'com.android.application'

    android {
            compileSdkVersion 22
            buildToolsVersion '23.0.2'
            packagingOptions {
                    exclude 'LICENSE.txt'
            }
            defaultConfig {
                    applicationId "package"
                    minSdkVersion 15
                    targetSdkVersion 22
                    versionCode 1
                    versionName "1.0"
                    testApplicationId "package.test"
                    testInstrumentationRunner "package.test.Instrumentation"
            }
            buildTypes {
                    release {
                            minifyEnabled false
                            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
                    }
            }
            sourceSets {
                    androidTest {
                            assets.srcDirs = ['src/androidTest/assets']
                    }
            }
            adbOptions {
                    timeOutInMs 60000 // set timeout to 1 minute
            }
    }

    dependencies {
            compile fileTree(dir: 'libs', include: ['*.jar'])
            compile 'com.android.support:appcompat-v7:22.2.1'
            compile project(':sdk')
            androidTestCompile('com.android.support.test:runner:0.4') {
                    exclude module: 'support-annotations'
            }
            androidTestCompile('com.android.support.test:rules:0.4') {
                    exclude module: 'support-annotations'
            }
            androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.1') {
                    exclude module: 'support-annotations'
            }

            androidTestCompile 'org.mockito:mockito-core:1.+'
            androidTestCompile 'com.google.dexmaker:dexmaker:1.2'
            androidTestCompile 'com.google.dexmaker:dexmaker-mockito:1.2'
            androidTestCompile('com.android.support.test.espresso:espresso-contrib:2.2.1') {
                    exclude module: 'support-annotations'
                    exclude group: 'com.android.support', module: 'appcompat'
                    exclude group: 'com.android.support', module: 'support-v4'
                    exclude module: 'recyclerview-v7'
            }

            androidTestCompile 'info.cukes:cucumber-android:1.2.0@jar'
            androidTestCompile 'info.cukes:cucumber-picocontainer:1.2.0'
    }

Reference : Cucumber Android Test link

Maduro answered 10/3, 2016 at 12:11 Comment(1)
Restarting Android Studio + Clean worked for meOlander
N
13

I faced same error yesterday

uninstalling the build-tools:20 worked for me

answer on this issue was helpful

Nephew answered 15/3, 2016 at 6:12 Comment(0)
C
5

rename the folder

"sdk/build-tools/android-4.4W"-> "sdk/build-tools/20.0.0"

Cusco answered 14/4, 2016 at 15:48 Comment(0)
C
1

Why do you guys complicate if the warning is self-explanatory?

Observed package id 'build-tools;20.0.0' in inconsistent location 'sdk/build-tools/android-4.4W' (Expected 'sdk/build-tools/20.0.0')

Just amend the location accordingly

sudo mv sdk/build-tools/android-4.4W sdk/build-tools/20.0.0
Carthage answered 25/1, 2023 at 18:56 Comment(0)
O
0

May be you have two build tools folder with the same version. In this case you might have two build tools folder for 20.0.0 version. Delete any one of them will resolve the issue.

Otherwise, your build tools got corrupted. So, delete the folder or uninstall it using android studio or SDK manager then install it again.

Odyl answered 16/9, 2021 at 17:38 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.