Я пытаюсь использовать firebase с моим приложением, и я сделал все шаги, перечисленные на официальном сайте firebase, как добавить плагин google-service и продукты firebase в мой модуль и проект build.gradle, но я все еще получен этот список ошибок:
ОШИБКА: Метод Gradle DSL не найден: 'Implementiation ()' Возможные причины:
1 - Возможно, проект 'FriendlyChat' использует версию Android подключаемого модуля Gradle, который не содержит метод (например, 'testCompile' был добавлен в 1.1.0).
2-Проект 'FriendlyChat' может использовать версию Gradle, которая делает не содержит метод.
3-В файле сборки может отсутствовать плагин Gradle.
, и я сослался на возможные решения здесь на stackoverflow, но я получил те же результаты.
вот мой проект: buidl.gradle:
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
classpath 'com.google.gms:google-services:4.3.3'
// 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
}
вот мое приложение: build.gradle:
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 28
buildToolsVersion "29.0.2"
defaultConfig {
applicationId "com.example.friendlychat"
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 'androidx.constraintlayout:constraintlayout:1.1.3'
implementiation 'com.google.firebase:firebase-perf:19.0.4'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
api 'com.google.android.material:material:1.1.0-alpha06'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
androidTestImplementation 'androidx.test:core:1.1.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.0'
androidTestImplementation 'androidx.test:runner:1.2.0-alpha05'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0-alpha05'
}