我正在尝试在 Android Studio 中打开现有的 android 项目,gradle
但无法构建应用程序,它显示错误为:
错误:强文本在 org.gradle.api.internal.artifacts.dsl.dependencies 类型的对象上找不到参数 [com.google.firebase:firebase-ml-model-interpreter:15.0.0] 的方法 implementation()。默认依赖处理程序。
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.google.firebase.codelab.mlkit_custommodel"
minSdkVersion 19
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
aaptOptions {
noCompress "tflite"
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.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'
implementation 'com.google.firebase:firebase-core:15.0.2'
implementation 'com.google.firebase:firebase-ml-model-interpreter:15.0.0'
}
apply plugin: 'com.google.gms.google-services'