在不一致的位置观察到包 id 'build-tools;20.0.0' [英] Observed package id 'build-tools;20.0.0' in inconsistent location

查看:47
本文介绍了在不一致的位置观察到包 id 'build-tools;20.0.0'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  ./gradlew --parallel :app:assembleDebugTest

当我在 android studio 终端中运行上述命令时,出现此错误.

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

错误并行执行是一个孵化功能.在不一致的位置 'sdk/build-tools/android-4.4W' 中观察到包 id 'build-tools;20.0.0'(预期为 'sdk/build-tools/20.0.0')

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 文件应用插件:'com.android.application'

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'
    }

参考:Cucumber Android 测试 链接

Reference : Cucumber Android Test link

推荐答案

我昨天遇到了同样的错误

I faced same error yesterday

卸载 build-tools:20 对我有用

uninstalling the build-tools:20 worked for me

对这个问题的回答很有帮助

这篇关于在不一致的位置观察到包 id 'build-tools;20.0.0'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆