Unresolved reference #HiltAndroidApp or any other Hilt annotation in Android - android

I have done everything properly but still, I can't use Hilt in my project.
build.gradle(:app)
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
apply plugin: 'kotlin-kapt'
apply plugin: 'dagger.hilt.android.plugin'
android {
compileSdkVersion 29
buildToolsVersion "29.0.3"
buildFeatures{
viewBinding = true
dataBinding = true
}
defaultConfig {
applicationId "com.emptysheet.pdfreader_autoscroll"
minSdkVersion 16
targetSdkVersion 29
versionCode 7
versionName "1.7"
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
// To inline the bytecode built with JVM target 1.8 into
// bytecode that is being built with JVM target 1.6. (e.g. navArgs)
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.core:core-ktx:1.3.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.android.material:material:1.1.0'
implementation 'androidx.preference:preference:1.1.1'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.navigation:navigation-fragment:2.2.2'
implementation 'androidx.navigation:navigation-ui:2.2.2'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
implementation 'androidx.navigation:navigation-fragment-ktx:2.2.2'
implementation 'androidx.navigation:navigation-ui-ktx:2.2.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation project(path: ':android-pdf-viewer')
//firebase for crashlytics
implementation 'com.google.firebase:firebase-analytics-ktx:17.4.3'
implementation 'com.google.firebase:firebase-crashlytics:17.0.1'
// for ads
implementation 'com.google.android.gms:play-services-ads:19.1.0'
// multidex
//room
implementation 'androidx.room:room-ktx:2.2.5'
kapt "androidx.room:room-compiler:2.2.5"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.7"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.0"
//debug database
debugImplementation 'com.amitshekhar.android:debug-db:1.0.6'
implementation 'de.psdev.licensesdialog:licensesdialog:2.1.0'
//support for APK less than 21
implementation 'androidx.multidex:multidex:2.0.1'
// in app billing
implementation 'com.android.billingclient:billing-ktx:3.0.0'
// Hilt
implementation "com.google.dagger:hilt-android:2.28-alpha"
kapt "com.google.dagger:hilt-android-compiler:2.28-alpha"
}
build.gradle(Project)
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.3.72'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.0.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
classpath 'com.google.gms:google-services:4.3.3'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.1.1'
classpath 'com.google.dagger:hilt-android-gradle-plugin:2.28-alpha'
// 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
}
When I am using #HiltAndroidApp or any other Hilt annotation. It says Unresolved reference. Create annotation. I have tried re-installing Hilt but it's still not working.
I am also using Android Studio 4.0

Try the usual:
File -> Invalidate Caches / Restart ... (and click Invalidate and Restart)

From the toolbar, press 'Sync Project with Gradle Files'.
Invalidate Caches / Restart

Related

I have implemented retrofit library with gson but getting an importing error "Cannot resolve symbol 'Gson'"

I have implemented retrofit library with gson but getting an importing error.
Android studio version
Android Studio Arctic Fox | 2020.3.1 Patch 2 Build
#AI-203.7717.56.2031.7678000, built on August 27, 2021
App level build.gradle
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
plugins {
id 'com.android.application'
id 'com.google.gms.google-services'
id 'kotlin-android'
id 'kotlin-kapt'
}
android {
compileSdk 31
defaultConfig {
applicationId "com.example.app"
minSdk 21
targetSdk 31
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
buildFeatures {
viewBinding true
dataBinding true
}
}
dependencies {
implementation 'androidx.core:core-ktx:1.7.0'
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'com.google.android.material:material:1.4.0'
// Import the Firebase BoM
implementation platform('com.google.firebase:firebase-bom:29.0.3')
// Declare the dependency for the Firebase Authentication library
implementation 'com.google.firebase:firebase-auth-ktx'
implementation 'com.google.firebase:firebase-messaging-ktx'
implementation 'com.google.firebase:firebase-analytics-ktx'
implementation 'com.google.android.gms:play-services-safetynet:18.0.0'
//Nav Component
implementation "androidx.fragment:fragment-ktx:1.3.6"
implementation "androidx.navigation:navigation-fragment-ktx:2.3.5"
implementation "androidx.navigation:navigation-ui-ktx:2.3.5"
// Live Data
implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycleVersion"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycleVersion"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycleVersion"
//Material Dialog
implementation 'com.afollestad.material-dialogs:core:3.3.0'
implementation 'com.afollestad.material-dialogs:bottomsheets:3.3.0'
//RecyclerView
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.1'
//interceptor
implementation 'com.itkacher.okhttpprofiler:okhttpprofiler:1.0.7'
//Retrofit
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
implementation "com.squareup.okhttp3:logging-interceptor:4.8.0"
implementation 'org.conscrypt:conscrypt-android:2.2.1'
testImplementation 'junit:junit:'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}
Top-level build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:7.0.3"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.31"
classpath 'com.google.gms:google-services:4.3.10'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
settings.gradel
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
jcenter() // Warning: this repository is going to shut down soon
maven { url "https://jitpack.io" }
}
}
rootProject.name = "Exaple app"
include ':app'
getting this error
I have already done some stuff like clean project, rebuild and invalidate caches, and restart. But still getting the same error.
Thanks in advance.
You need to implement also the GSON dependency
You missing this I'd say
implementation("com.google.code.gson:gson:2.8.9")

android studio error java.lang.NullPointerException: Cannot get property 'kotlin_version' on null object when i try to build

i just learnt kotlin and im trying to put my skills to practice, i created a new project and even implemented firebase authentication, now i try to creaate a new activity and im getting
java.lang.NullPointerException: Cannot get property 'kotlin_version' on null object
Error on build console. i have tried to get similar questions though none was very directly related to mine.
This is how my top level gradle file looks like:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.3.72'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.3'
classpath 'com.google.firebase:perf-plugin:1.3.1'
// 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
}
This is my app level gradle file:
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.firebase-perf'
android {
compileSdkVersion 29
buildToolsVersion "29.0.3"
defaultConfig {
applicationId "com.example.findmyapartment"
minSdkVersion 21
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
// To inline the bytecode built with JVM target 1.8 into
// bytecode that is being built with JVM target 1.6. (e.g. navArgs)
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8 kotlin_version
targetCompatibility JavaVersion.VERSION_1_8 kotlin_version
}
kotlinOptions {
jvmTarget = "1.8"
}
viewBinding {
enabled = true
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7: $kotlin_version"
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.core:core-ktx:1.3.0'
implementation 'com.google.android.material:material:1.1.0'
implementation 'androidx.annotation:annotation:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
implementation 'com.google.android.gms:play-services-maps:17.0.0'
implementation 'androidx.navigation:navigation-fragment-ktx:2.2.2'
implementation 'androidx.navigation:navigation-ui-ktx:2.2.2'
implementation 'com.google.firebase:firebase-analytics-ktx:17.4.4'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.firebase:firebase-auth-ktx:19.3.2'
implementation 'com.google.firebase:firebase-firestore-ktx:21.5.0'
implementation 'com.google.firebase:firebase-storage-ktx:19.1.1'
implementation 'com.google.firebase:firebase-perf:19.0.6'
implementation 'com.google.firebase:firebase-messaging:20.1.5'
implementation 'com.google.firebase:firebase-inappmessaging-display:19.0.5'
implementation "androidx.fragment:fragment-ktx:1.3.0-alpha04"
debugImplementation "androidx.fragment:fragment-testing:1.3.0-alpha04"
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}
apply plugin: 'com.google.gms.google-services'
with that i'm convinced my kotlin configuration is done fine by android studio itself and
i havent added any updates or pluggins. i will appreciate if somebody helps me.

After adding dependencies having this error, anyone know how to fix?

I am trying to create a new project based on MVVM and was adding all the dependencies needed.
This is what i had added and done so far :
Added dependencies inside gradle file
Added plugin
Enabled dataBinding to true
Added classpath in gradle file
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.1.0-alpha05"
Added android.databinding.enableV2=true
inside gradle.properties
I am following guide from this youtube playlist :
https://www.youtube.com/watch?v=Rd5dLmKewqg&list=PLk7v1Z2rk4hjVaZ8DZKe8iT9RIM9OUrwp&index=2
Things i had tried so far :
I had checked if
android.useAndroidX=true and android.enableJetifier=true
Replaced to minifyEnable false inside the gradle file
The app cannot even compile and have been showing error
This is my gradle project file:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.3.50'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.1.0-alpha05"
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
This is my gradle Module:app file :
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
//kotlin kapt and navigation safeargs plugin
apply plugin: 'kotlin-kapt'
apply plugin: "androidx.navigation.safeargs"
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.mvvmsampleapp"
minSdkVersion 22
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'
}
}
dataBinding {
enabled = true
}
[This is the error][1]}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.core:core-ktx:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
//Retrofit and GSON
implementation 'com.squareup.retrofit2:retrofit:2.6.0'
implementation 'com.squareup.retrofit2:converter-gson:2.6.0'
//Kotlin Coroutines
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.1.1"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.1.1"
// ViewModel and LiveData
implementation "androidx.lifecycle:lifecycle-extensions:2.0.0"
//New Material Design
implementation 'com.google.android.material:material:1.1.0-alpha07'
//Kodein Dependency Injection
implementation "org.kodein.di:kodein-di-generic-jvm:6.2.1"
implementation "org.kodein.di:kodein-di-framework-android-x:6.2.1"
//Android Room
implementation "androidx.room:room-runtime:2.1.0-rc01"
implementation "androidx.room:room-ktx:2.1.0-rc01"
kapt "androidx.room:room-compiler:2.1.0-rc01"
//Android Navigation Architecture
implementation "androidx.navigation:navigation-fragment-ktx:2.1.0-alpha05"
implementation "androidx.navigation:navigation-ui-ktx:2.1.0-alpha05"
implementation 'com.xwray:groupie:2.3.0'
implementation 'com.xwray:groupie-kotlin-android-extensions:2.3.0'
implementation 'com.xwray:groupie-databinding:2.3.0'
}
This is my error message
/Users/garylim/Downloads/MVVMSampleApp/app/build/generated/source/kapt/debug/com/example/mvvmsampleapp/DataBinderMapperImpl.java:9: error: cannot find symbol
import com.example.mvvmsampleapp.databinding.ActivityLoginBindingImpl;
^
symbol: class ActivityLoginBindingImpl
location: package com.example.mvvmsampleapp.databinding
P.S. Cannot post image yet

add kapt androidx room in gradle makes data binding error

After I add kapt "androidx.room:room-compiler:2.1.0-alpha05"
I get error when doing data binding. Here is my app gradle :
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'androidx.navigation.safeargs'
apply plugin: 'kotlin-kapt'
android {
compileSdkVersion 28
defaultConfig {
applicationId "insure.onoff"
minSdkVersion 23
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
dataBinding {
enabled = true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
// Gradle automatically adds 'android.test.runner' as a dependency.
useLibrary 'android.test.runner'
useLibrary 'android.test.base'
useLibrary 'android.test.mock'
applicationVariants.all {
variant ->
variant.outputs.all {
outputFileName = "./" + outputFileName
}
}
}
dependencies {
kapt "androidx.room:room-compiler:2.1.0-alpha05"
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.core:core-ktx:1.1.0-alpha05'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
implementation 'android.arch.navigation:navigation-fragment-ktx:1.0.0'
implementation 'android.arch.navigation:navigation-ui-ktx:1.0.0'
implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
implementation 'androidx.room:room-runtime:2.1.0-alpha05'
implementation 'android.arch.work:work-runtime-ktx:1.0.1-rc01'
implementation 'android.arch.navigation:navigation-fragment:1.0.0'
implementation 'org.greenrobot:eventbus:3.1.1'
implementation 'com.squareup.retrofit2:retrofit:2.5.0'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.squareup.okhttp3:logging-interceptor:3.12.1'
implementation 'com.squareup.retrofit2:converter-gson:2.5.0'
implementation 'com.squareup.retrofit2:adapter-rxjava:2.5.0'
implementation 'androidx.viewpager:viewpager:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'com.google.android.material:material:1.0.0'
implementation 'com.github.bumptech.glide:glide:4.9.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'
// AWS Dependencies
implementation "com.amazonaws:aws-android-sdk-core:2.11.1"
implementation "com.amazonaws:aws-android-sdk-auth-core:2.11.1"
implementation("com.amazonaws:aws-android-sdk-auth-userpools:2.11.1") { transitive = true }
implementation("com.amazonaws:aws-android-sdk-auth-ui:2.11.1") { transitive = true }
implementation 'com.facebook.android:facebook-login:4.36.0'
implementation "com.google.android.gms:play-services-auth:16.0.1"
// Testing dependencies
androidTestImplementation "androidx.arch.core:core-testing:2.0.0"
androidTestImplementation "androidx.test.espresso:espresso-contrib:3.1.1"
androidTestImplementation "androidx.test.espresso:espresso-core:3.1.1"
androidTestImplementation "androidx.test.espresso:espresso-intents:3.1.1"
androidTestImplementation "androidx.test.uiautomator:uiautomator:2.2.0"
testImplementation "junit:junit:4.12"
}
project gradle :
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.3.20'
repositories {
google()
jcenter()
maven { url 'http://dl.bintray.com/kotlin/kotlin-eap' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.2'
classpath 'android.arch.navigation:navigation-safe-args-gradle-plugin:1.0.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
maven { url 'http://dl.bintray.com/kotlin/kotlin-eap' }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Error :
My Android Studio version :
Android Studio 3.3
Build #AI-182.5107.16.33.5199772, built on December 25, 2018
JRE: 1.8.0_152-release-1248-b01 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.12.5
When you get databinding errors, they are usually the result of a compilation error within the code.
Using the picture you have posted as reference, there are 4 Icons on the vertical toolbar on the left side of the screen. The top icon is the green hammer. Click the icon just below that (the 2nd one, it looks like two screens layered on top of each other). Clicking this icon opens up a different view that describes in detail what the compiler did not like - you generally will find what is causing the problems.
You can also run "gradle build -debug" or some other debug tracing cmd for gradle that will print in detail what the errors are.
Double check kotlin is compiling to your target jvm version 1.8
If all else fails, try clean/build + invalidate/cache + restart. Hope this helps.

Adding firebase dependency causes gradle sync to fail

I added the firebase database dependency via the Tools->Firebase->Add Real Time Database to your app method, and this causes my gradle sync to fail. I'm guessing either there is a conflict in dependencies (because I have already set up google sign in for my app using firebase and everything is working fine) or the wrong dependency was loaded
implementation 'com.google.firebase:firebase-database:16.0.1:15.0.0'
Module Gradle File:
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 28
defaultConfig {
applicationId "nus.is3261.kotlinapp"
minSdkVersion 21
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:design:28.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.firebase:firebase-auth:16.0.5'
implementation 'com.google.firebase:firebase-core:16.0.4'
implementation 'com.google.android.gms:play-services-auth:16.0.1'
implementation 'com.shaishavgandhi:login-buttons:1.0.0'
compile 'com.github.bumptech.glide:glide:4.8.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'
implementation 'com.google.firebase:firebase-database:16.0.1:15.0.0'
}
apply plugin: 'com.google.gms.google-services'
Project Gradle File:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.2.70'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.1.0'
// 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
}
Try to Replace
implementation 'com.google.firebase:firebase-database:16.0.1:15.0.0'
with
implementation 'com.google.firebase:firebase-database:16.0.4'

Categories

Resources