繁体   English   中英

错误=>无法确定任务':app:compileDebugJavaWithJavac'的依赖关系

[英]Error=> Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'

当我在Android Studio中执行我的android应用程序时出现问题,如下所示。 我该如何解决这个问题?

Error:Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'. Could not create service of type AnnotationProcessorDetector using JavaGradleScopeServices.createAnnotationProcessorDetector().

build.gradle:

apply plugin: 'com.android.application'
android {
    compileSdkVersion 26
    defaultConfig {
        applicationId "com.example.toshiba.bluetooth_deneme"
        minSdkVersion 15
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.1'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
    compile 'com.android.support:support-annotations:27.0.2'
}

我遇到了类似的问题,结果发现我的项目需要重新同步。 单击下面的按钮为我修复了该问题。 (我不能说为什么会这样。)

同步项目按钮

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM