【发布时间】:2021-05-21 13:49:33
【问题描述】:
我从 github 下载了一个项目。我正在尝试运行它,但它无法运行并给我那个错误。这是我的 gradle.build 文件
apply plugin: 'com.android.application'
repositories {
mavenLocal()
flatDir {
dirs 'libs'
}
}
android {
compileSdkVersion 29
buildToolsVersion "29.0.2"
defaultConfig {
applicationId "com.google.firebase.udacity.friendlychat"
minSdkVersion 16
targetSdkVersion 29
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE-FIREBASE.txt'
exclude 'META-INF/NOTICE'
}
}
dependencies {
mplementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.2.1'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
// Displaying images
implementation 'com.github.bumptech.glide:glide:3.6.1'
}
这是我每次运行时收到的错误消息
A problem occurred evaluating project ':app'.
> Could not find method mplementation() for arguments [androidx.appcompat:appcompat:1.2.0] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
这是我试图在我的 android studio 中运行的项目的链接
【问题讨论】:
-
不用担心。我已经弄清楚我犯错的地方了。依赖项中存在拼写错误。表明我已通过在实施(实施)之前添加 i 来纠正它。