web-dev-qa-db-ja.com

Android-Gradleの同期に失敗しました:org / jetbrains / kotlin / kapt / idea / KaptGradleModelorg / jetbrains / kotlin / kapt / idea / KaptGradleModel

昨日、理由もなく、my Android Studioが次のメッセージを表示し始めます:

Gradle sync failed: org/jetbrains/kotlin/kapt/idea/KaptGradleModelorg/jetbrains/kotlin/kapt/idea/KaptGradleModel
Consult IDE log for more details (Help | Show Log) (2 s 227 ms)

しかし、私はKotlinも使用していません!それらは私のgradleファイルです:

//共通の構成オプションを追加できるトップレベルのビルドファイル

all sub-projects/modules.

buildscript {

    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.Android.tools.build:gradle:3.2.1'
        // Firebase import
        classpath 'com.google.gms:google-services:4.2.0'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files

        // Stupid kotlin build-in plugin
    }
}

allprojects {
    repositories {
        google()
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}


apply plugin: 'com.Android.application'

repositories {
    jcenter()
}

Android {
    compileSdkVersion 28
    testOptions  {
        unitTests {
            includeAndroidResources = true
            returnDefaultValues = true
        }
    }
    defaultConfig {
        applicationId "com.example.olegario.escamboapp"
        minSdkVersion 21
        targetSdkVersion 28
        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:28.0.0'
    implementation 'com.Android.support.constraint:constraint-layout:1.1.3'
    implementation 'com.Android.support:design:28.0.0'
    implementation 'com.Android.support:support-v4:28.0.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.Android.support.test:runner:1.0.2'
    androidTestImplementation 'com.Android.support.test.espresso:espresso-core:3.0.2'

    // Scroll view
    implementation 'com.Android.support.constraint:constraint-layout:1.0.2'

    // Firebase
    implementation 'com.google.firebase:firebase-core:16.0.5'
    // Firebase database
    implementation 'com.google.firebase:firebase-database:16.0.6'
    // Firebase storage
    implementation 'com.google.firebase:firebase-storage:16.0.1'
    // Firebase authentication
    implementation 'com.google.firebase:firebase-auth:16.0.5'

    // Mask
    implementation 'com.vicmikhailau:MaskedEditText:2.0.4'

    // test
    testImplementation 'junit:junit:4.12'
    testImplementation 'androidx.test:core:1.0.0'
    testImplementation 'org.mockito:mockito-core:1.10.19'
    testImplementation 'org.robolectric:robolectric:4.2'
    androidTestImplementation 'org.mockito:mockito-Android:+'
    androidTestImplementation 'com.Android.support:support-annotations:24.0.0'
    androidTestImplementation 'com.Android.support.test:runner:0.5'
    androidTestImplementation 'com.Android.support.test:rules:0.5'
    androidTestImplementation 'com.Android.support.test.espresso:espresso-core:2.2.2'
    androidTestImplementation 'com.Android.support.test.espresso:espresso-contrib:3.0.2'

    // Framework
    implementation project(':capuccino')

}
apply plugin: 'com.google.gms.google-services'

なぜこれが起こっているのですか?昨日もAndroid Studioをバージョン3.4に更新しましたが、このエラーは数時間の更新後に表示されるようになったため、更新はエラーとは関係ないと想定しています。

6
olegario

数日後、エラーは単にIDEから消えます。前回のアップデートにはある種のバグがあったと思います。

0
olegario

私の場合、gradle-wrapper.propertiesファイルのdistributionUrlを最新の 公式のGradle Webサイト で更新する必要がありました。

distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.Zip
1
Thomas Mary