gpt4 book ai didi

Android - Gradle 同步失败 : org/jetbrains/kotlin/kapt/idea/KaptGradleModelorg/jetbrains/kotlin/kapt/idea/KaptGradleModel

转载 作者:塔克拉玛干 更新时间:2023-11-02 21:53:02 27 4
gpt4 key购买 nike

昨天,我的 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,但是这个错误在更新几个小时后开始出现,所以我假设更新与错误无关。

最佳答案

升级您的 Kotlin 插件。

简单的方法(推荐)。

Double shift -> 插件 -> 更新 -> 搜索 Kotlin -> 更新! -> 重启 AS

手动方式(如果需要)。

1) 从 this link 手动下载 Kotlin 插件.

2) Double shift -> Plugins -> (Settings) Icon -> Install from disk -> 选择插件。

3) 重新启动。

关于Android - Gradle 同步失败 : org/jetbrains/kotlin/kapt/idea/KaptGradleModelorg/jetbrains/kotlin/kapt/idea/KaptGradleModel,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55774797/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com