How to use Picasso library with Androidx? - android

I have an One year old code, which I worked so hard on, this code uses picasso library in some places to download images and use them. Today I try to improve my code, migrate to androidx and upgrade Gradle to the latest version, but it doesn't seem to sync gradle file anymore, when I comment the implementation for picasso library, the sync goes smoothly again.
Google recommends migrating to androidx to be able to serve the latest android versions, the latest play services and jetpack libraries. What is the problem? and how it can be solved?
This is my Gradle app level file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 29
buildToolsVersion "29.0.2"
defaultConfig {
applicationId "com.ramikabbani.sheikhsouk"
minSdkVersion 19
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'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
// Picasso
implementation 'com.squareup.picasso:picasso:2.71828'
// Glide
implementation 'com.github.bumptech.glide:glide:4.9.0'
implementation 'com.google.android.material:material:1.1.0'
//
}
and this is my top level project gradle file:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.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 the old project app level gradle file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 29
defaultConfig {
applicationId "com.dalilukom.dalilukom"
minSdkVersion 19
targetSdkVersion 29
versionCode 21
versionName "1.21"
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 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.16'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'com.github.bumptech.glide:glide:3.8.0'
//implementation 'com.android.volley:volley:1.1.1'
implementation 'com.android.support:design:26.1.0'
implementation 'com.android.support:support-v4:26.1.0'
// implementation 'com.amitshekhar.android:android-networking:1.0.2'
// implementation 'com.android.support:design:26.1.0'
// implementation 'com.android.support:appcompat-v7:27.1.1'
// implementation 'com.android.support:design:27.1.1'
//implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
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'
}
and this is the top level gradle file for the old project too:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.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
}

Just migrate to androidx and get the Picasso dependency for androidx on your grade file. You should be fine

Just found a workaround.
In build.gradle (project:..) , of the project gradle file ,downgrade plugin to '7.2.1' and recompile.
plugins {
id 'com.android.application' version '7.2.1' apply false
id 'com.android.library' version '7.2.1' apply false
}
and it works , seems like it unsupported on later versions.
But I think you should change the file gradle.properties( Project properties ) under android.useAndroidX=true
Put:
android.enableJetifier=true
putting whole file content of gradle.properties( Project properties )
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
android.useAndroidX=true
android.enableJetifier=true
android.nonTransitiveRClass=true

Related

Error in implementing Firebase admin sdk in android studio

When I am implementing firebase admin libraries
it is showing error I have mentioned after my app and project level gradle files below.
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 29
buildToolsVersion "29.0.3"
configurations {
all*.exclude module: 'support-v4' // This removes all other versions of `support-v4` if gets duplicated from all the artifacts.
}
defaultConfig {
applicationId "com.example.trolificnss"
minSdkVersion 16
targetSdkVersion 29
versionCode 1
versionName "1.0"
multiDexEnabled true
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 "com.firebaseui:firebase-ui-auth:6.2.0"
implementation 'com.google.firebase:firebase-auth:19.2.0'
implementation 'com.google.firebase:firebase-admin:6.12.2'
implementation 'com.google.firebase:firebase-analytics:17.2.3'
implementation 'com.google.firebase:firebase-firestore:21.4.1'
implementation 'com.firebaseui:firebase-ui-database:6.2.0'
implementation 'com.firebaseui:firebase-ui-storage:6.2.0'
implementation "com.google.firebase:firebase-firestore:21.4.1"
implementation "com.firebaseui:firebase-ui-firestore:6.2.0"
implementation 'com.firebaseui:firebase-ui-database:6.2.0'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.firebaseui:firebase-ui-firestore:6.2.0'
implementation 'com.google.firebase:firebase-storage:19.1.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.firebaseui:firebase-ui-auth:6.2.0'
implementation 'net.schmizz:sshj:0.10.0'
}
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.1'
classpath 'com.google.gms:google-services:4.2.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
}
Below is the error message,
In project 'app' a resolved Google Play services library dependency
depends on another at an exact version (e.g. "[1.21. 0]", but isn't
being resolved to that version. Behavior exhibited by the library will
be unknown.
buildscript {
ext.kotlin_version = '1.2.21'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
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()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
---------------------------------------------------------------------------
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 26
defaultConfig {
applicationId "org.solamour.myserver"
minSdkVersion 14
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
javaCompileOptions {
annotationProcessorOptions {
includeCompileClasspath false
}
}
resConfigs "auto"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
// Conflict with dependency 'com.google.code.findbugs:jsr305' in project ':app'.
// Resolved versions for app (1.3.9) and test app (2.0.1) differ.
configurations.all {
resolutionStrategy.force 'com.google.code.findbugs:jsr305:2.0.1' // Or "1.3.9".
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation 'com.google.firebase:firebase-admin:4.1.6'
implementation 'com.android.support:multidex:1.0.2'
}
take a look at the javadoc for FirebaseOptions Builder in the Android client library:
com.google.firebase.FirebaseOptions.Builder
Now look at the same class from the java Admin SDK (note the URL is different):
com.google.firebase.FirebaseOptions.Builder
Remove this:
implementation 'com.google.firebase:firebase-admin:6.12.2'
You can't effectvely use the Firebase Admin SDK in an Android app. It's meant only for code that runs on backend servers and desktop machines.
Also, you should always make sure your Android client library dependencies are at the current versions shown in the release notes. Your Firebase-UI library versions should also match with the other Firebase libraries.

Annotation processors must be explicitly declared now. The following dependencies on the compile classpath?

I am developing new app using android architecture components but I am getting the following error from gradle
Annotation processors must be explicitly declared now. The following dependencies on the compile classpath are found to contain annotation processor. Please add them to the annotationProcessor configuration.
- lifecycle-compiler-2.0.0.jar (androidx.lifecycle:lifecycle-compiler:2.0.0)
Alternatively, set android.defaultConfig.javaCompileOptions.annotationProcessorOptions.includeCompileClasspath = true to continue with previous behavior. Note that this option is deprecated and will be removed in the future.
See https://developer.android.com/r/tools/annotation-processor-error-message.html for
below is my app.gradle
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 29
buildToolsVersion "29.0.2"
defaultConfig {
applicationId "com.example.lifecycleawaredemo"
minSdkVersion 15
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'
}
}
}
dependencies {
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.0.2'
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'
implementation 'androidx.lifecycle:lifecycle-compiler:2.0.0'
def lifecyle_version = "1.1.1"
implementation "android.arch.lifecycle:extensions:$lifecyle_version"
implementation "android.arch.lifecycle:compiler:$lifecyle_version"
}
below my build.gradle
buildscript {
ext.kotlin_version = '1.3.31'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.2'
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 'https://maven.google.com' }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
First of all, you appear to be mixing up your androidx lifecycle dependencies. You are using androidx artifacts, so you can drop this part:
def lifecyle_version = "1.1.1"
implementation "android.arch.lifecycle:extensions:$lifecyle_version"
implementation "android.arch.lifecycle:compiler:$lifecyle_version"
You should only need:
implementation 'androidx.lifecycle:lifecycle-compiler:2.0.0'
Now, as to the error, the message says that the lifecycle-compiler contains annotation processors, so you should add them to the annotationProcessor configuration. To do this, add the following line at the apply plugin section for your app.gradle:
apply plugin: 'kotlin-kapt'
This will enable the kotlin annotation processor support. Next, change the:
implementation 'androidx.lifecycle:lifecycle-compiler:2.0.0'
to allow the compiler to use the included annotation processors:
kapt 'androidx.lifecycle:lifecycle-compiler:2.0.0'
and that should compile fine.

firebase-measurement-connector-impl cannot be resolved when syncing with gradle files

In short, when I implement the latest version of firebase-core (version 16.0.7) in my APP-LEVEL build.gradle file, and when I sync with Gradle files, it fails to download one of the dependencies for firebase-core, called firebase-measurement-connector-impl. It searches for version 17.0.5, and it fails to download it.
I took a look at Google's Maven repository (maven.google.com) and in mvnrepository.com, and the version exists. But when I try to download the .jar file manually myself (using Chrome), it ALSO errors out! It says "Error - no file". Am I onto something, or am I missing something (like always)?
App-level build.gradle:
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
check.dependsOn 'assembleDebugAndroidTest'
android {
compileSdkVersion 28
flavorDimensions "minSdkVersion"
defaultConfig {
applicationId "me.testweb.firebaseoauthtest"
buildToolsVersion("28.0.3")
minSdkVersion 21
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner
'android.support.test.runner.AndroidJUnitRunner'
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
buildToolsVersion '28.0.3'
}
configurations.all {
resolutionStrategy.force 'com.android.support:support-
annotations:28.0.0'
}
dependencies {
implementation project(':chooser')
implementation project(':lintchecks')
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:animated-vector-drawable:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
// Firebase Authentication
implementation 'com.google.firebase:firebase-core:16.0.7'
implementation 'com.google.firebase:firebase-auth:16.1.0'
// Google Sign In SDK (only required for Google Sign In)
implementation 'com.google.android.gms:play-services-auth:16.0.1'
// Firebase UI
// Used in FirebaseUIActivity.
implementation 'com.firebaseui:firebase-ui-auth:4.3.1'
// Twitter Android SDK (only required for Twitter Login)
implementation 'com.twitter.sdk.android:twitter-core:3.3.0'
implementation 'com.twitter.sdk.android:twitter:3.3.0'
androidTestImplementation 'com.android.support.test.espresso:espresso-
core:3.0.2'
androidTestImplementation 'com.android.support.test:rules:1.0.2'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.21"
}
apply plugin: 'com.google.gms.google-services'
Project-level build.gradle:
// Top-level build file where you can add configuration options common to
all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.1'
classpath 'com.google.gms:google-services:4.2.0'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.21'
}
}
allprojects {
repositories {
//mavenLocal() must be listed at the top to facilitate testing
mavenLocal()
google()
jcenter()
maven { url 'https://maven.fabric.io/public' }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
The expected result, is that the build process will download everything successfully (including firebase-measurement-connector-impl), and it won't show any errors.
The actual result, is that it will FAIL to download firebase-measurement-connector-impl, but everything still builds successfully (???).
Change from
implementation 'com.google.firebase:firebase-core:16.0.7'
To
implementation 'com.google.firebase:firebase-core:16.0.5'

Getting error "All gms/firebase libraries must use the exact same version specification" but not using Firebase in project

I've been getting this error and have tried all the steps to fix I've found online. The error says a gms/firebase library is the wrong version but there are no firebase dependancies in the app.
The error:
"All gms/firebase libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 16.0.1, 16.0.0. Examples include com.google.android.gms:play-services-base:16.0.1 and com.google.android.gms:play-services-maps:16.0.0"
The dependency com.google.android.gms:play-services-maps:16.0.0 is not in my dependencies and yet it still says it's the wrong version compared with the play-services-maps.
I've tried changing play-services-maps to 16.0.1 but that version doesn't exist. I've also tried adding implementation 'com.google.android.gms:play-services-base:16.0.0' to the file, but it gives the same error.
My Build.gradle (App)
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.example.nameomitted"
minSdkVersion 24
targetSdkVersion 24
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 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:design:26.1.0'
implementation 'com.google.android.gms:play-services-maps:16.0.0'
implementation 'com.android.support:support-annotations:27.1.1'
implementation 'com.android.support:support-v4:26.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'
}
My Build.gradle (project)
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.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
}
Thanks in advance

Gradle Project Sync Failed cause Firebase installation in Android Studio

I'm trying to resolve this problem looking for the similar question as mine in Stackoverflow, I have spend 6 hours and I am not able to solve it.
I've created a new project in AndroidStudio (version 3.2) and I've installed Firebase Google. One mistake appear in Gradle, I show with a image:enter image description here
The code of app gradle:
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.android.estermateossaldana.cadenadefavores"
minSdkVersion 19
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 'com.android.support:appcompat-v7:28.0.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
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.1:15.0.0'
implementation 'com.google.firebase:firebase-database:16.0.1:15.0.0'
implementation 'com.google.firebase:firebase-storage:16.0.1:15.0.0'
}
The code of build gradle:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.0'
classpath 'com.google.gms:google-services:4.0.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
}
Trying to solve with the indications of you, the code is like:
Gradel Build code:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.0'
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
}
And the Gradle App code now is:
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.android.estermateossaldana.cadenadefavores"
minSdkVersion 19
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 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:support-media-compat:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
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-database:16.0.1:15.0.0'
implementation 'com.google.firebase:firebase-auth:16.0.3:15.0.0'
implementation 'com.google.firebase:firebase-storage:16.0.1:15.0.0'
}
I show you the error in the image:enter image description here
Version of Android Studio and Gradle: enter image description here
The option of Use default gradle wrapper is checked.
-------> New screenshot: enter image description here
Try to add this to your build.gradle dependency too:
implementation 'com.android.support:support-v4:28.0.0'
So the dependencies in app/build.gradle should be:
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:support-media-compat:28.0.0'
implementation 'com.android.support:support-v4:28.0.0' // added this
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.firebase:firebase-core:16.0.4'
implementation 'com.google.firebase:firebase-auth:16.0.4'
implementation 'com.google.firebase:firebase-database:16.0.3'
implementation 'com.google.firebase:firebase-storage:16.0.3'
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'
}
Remember to check the samples and the libraries section.

Categories

Resources