Вы должны использовать implementation
вместо compile
.
И использовать эти библиотеки Gradle, я уже проверил на своем компьютере.
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:1.2.41"
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.google.firebase:firebase-core:15.0.2'
implementation 'com.google.firebase:firebase-auth:15.0.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.android.gms:play-services:12.0.1'
Также в ProjectУровень build.gradle
Добавление репозиториев:
repositories {
maven{
url "https://maven.google.com"
}
google()
jcenter()
}
Проверьте скриншот для лучшего понимания: