gpt4 book ai didi

android build.gradle 模块应用程序错误 : Failed to resolve: annotation

转载 作者:行者123 更新时间:2023-12-03 05:42:53 25 4
gpt4 key购买 nike

gradle 出现一条错误消息:

Failed to resolve: annotation



更新 :

应用程序分级模块:
 apply plugin: 'com.android.application'

apply plugin: 'kotlin-android'

apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion 28
buildToolsVersion "28.0.1"
defaultConfig {
applicationId "com.isatelco.dietuser"
minSdkVersion 16
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'),
'proguard-rules.pro'
}
} }

dependencies{
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.0.0-alpha1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.0-alpha3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha3' }

和我的项目模块:
buildscript {
ext.kotlin_version = '1.2.50'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0-alpha03'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

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

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

应用程序模块是错误点.thk

最佳答案

您应该检查您的构建工具和 sdk 工具是否是最新的,检查它们并在必要时更新它们,只需这样做

enter image description here

enter image description here

重建 gradle 并告诉我是否有帮助

关于android build.gradle 模块应用程序错误 : Failed to resolve: annotation,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51672061/

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