android - 在不一致的位置观察到包 id 'build-tools;20.0.0'

标签 android android-studio gradle cucumber android-gradle-plugin

  ./gradlew --parallel :app:assembleDebugTest

当我在 android studio 终端中运行上面的命令时,出现了这个错误。

错误 并行执行是一项孵化功能。 在不一致的位置“sdk/build-tools/android-4.4W”中观察到包 ID“build-tools;20.0.0”(应为“sdk/build-tools/20.0.0”)

Gradle 文件 应用插件:'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 测试 link

最佳答案

我昨天遇到了同样的错误

卸载 build-tools:20 对我有用

回答这个 issue很有帮助

关于android - 在不一致的位置观察到包 id 'build-tools;20.0.0',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35916163/

相关文章:

java - Objective C NSData 等效十六进制值(iOS)在 JAVA(Android)中显示负整数值?

android - Google Playstore 应用程序版本检查不再有效

php - 如何修复android studio中的登录错误

android - android命令行生成错误:找不到com.android.tools.build:gradle

android - 升级到1.4后,Android Studio Gradle错误-错误:原因:https://downloads.gradle.org/distributions/gradle-2.2.1_all.zip

java - 如何在Android Studio 3.3中正确实现MapQuest的API

java - 如何使用 JSoup 导航页面

java - Arraylist.get 返回 null

java - 如何隐藏Toast消息的显示

android - fontFamily 属性不能通过 textAppearance 工作