gpt4 book ai didi

java - 无法获取 org.gradle.api.internal.artifacts.dsl.dependency.DefaultDependencyHandler 类型的对象的未知属性 'implementation'

转载 作者:太空宇宙 更新时间:2023-11-04 09:18:48 25 4
gpt4 key购买 nike

我已经搜索了上一篇文章,但找不到问题的答案,这是我的 build.gradle 文件中的代码。

错误:评估项目“:app”时出现问题。

Could not get unknown property 'implementation' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

    apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 29
defaultConfig {
applicationId "com.loganwiley.findmyphone"
minSdkVersion 17
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
compileKotlin {
kotlinOptions.suppressWarnings = true
}

compileKotlin {
kotlinOptions {
suppressWarnings = true
}
}
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'+
implementation 'com.android.support.constraint:constraint-layout:1.0.2'+
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'+
implementation 'com.google.firebase:firebase-auth:10.2.4'+
implementation 'com.google.firebase:firebase-database:10.2.4'+
implementation 'com.google.android.gms:play-services-maps:10.2.4'+
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'+
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'
}
repositories {
mavenCentral()
}

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

最佳答案

在多次依赖删除之后删除所有那些奇怪的加号 (+)。因此,例如,而不是:

implementation 'com.android.support:appcompat-v7:28.0.0'+

写:

implementation 'com.android.support:appcompat-v7:28.0.0'

关于java - 无法获取 org.gradle.api.internal.artifacts.dsl.dependency.DefaultDependencyHandler 类型的对象的未知属性 'implementation',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58608911/

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