-1

this is the ss of the error am getting and the code

implementation 'com.google.firebase:firebase-messaging:19.2.0'
implementation 'com.firebaseui:firebase-ui-database:2.1.0'
implementation 'com.google.android.gms:play-services-auth:17.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.github.bumptech.glide:glide:4.11.0'
implementation 'jp.wasabeef:glide-transformations:2.0.1'
implementation 'frankiesardo:icepick:3.2.0'
implementation 'org.greenrobot:eventbus:3.1.1'
implementation 'com.jakewharton:butterknife:10.2.1'
implementation 'com.zsoltsafrany:needle:1.0.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.1'
compileOnly 'frankiesardo:icepick-processor:3.2.0'
implementation 'joda-time:joda-time:2.10.5'
testImplementation 'junit:junit:4.13

this is my build.gradle code
i have attched the image of my code and therror am getting pls help me with resolveing this error

Peter Haddad
  • 78,874
  • 25
  • 140
  • 134
Ajith
  • 25
  • 2
  • 9

2 Answers2

2

Update the dependency to the following:

implementation 'com.google.firebase:firebase-messaging:20.1.0'

Also it seems you are using the android support libraries. But the newest version of firebase support androidx and not com.android.support. Therefore you need to do the following:

The updated libraries will not work unless you make the following changes in your app:

- Upgrade com.android.tools.build:gradle to v3.2.1 or later.
- Upgrade compileSdkVersion to 28 or later.
- Update your app to use Jetpack (AndroidX); follow the instructions in Migrating to AndroidX.

Check the following for more info:

https://developer.android.com/jetpack/androidx/migrate

https://firebase.google.com/support/release-notes/android#2019-06-17

Peter Haddad
  • 78,874
  • 25
  • 140
  • 134
1

There is no Firebase Cloud Messaging Library with Version 19.2.0

Change it to :

com.google.firebase:firebase-messaging:20.1.0

If you don't want to migrate with android x just try using :

Versions before 17 June. I don't recommand this as solution.

Please Read on this you will find Release Notes.

Ashish
  • 6,791
  • 3
  • 26
  • 48
  • i have tried it but im getting that errors sdk version 28 in build gradle – Ajith Jan 16 '20 at 07:14
  • This is not solution if you don't want to migrate with androidx just lower the version to the `Cloud Messaging version 19.0.0` – Ashish Jan 16 '20 at 07:17
  • after changing getting an error ERROR: Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91 is also present at [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory). Suggestion: add 'tools:replace="android:appComponentFactory"' to element at AndroidManifest.xml:6:5-59:19 to override. – Ajith Jan 16 '20 at 07:26
  • @Ajith i suggest to Migrate with [Android X](https://developer.android.com/jetpack/androidx/migrate). – Ashish Jan 16 '20 at 07:33
  • i have migrated to android x already – Ajith Jan 16 '20 at 07:34
  • Please post your gradle in code properly – Ashish Jan 16 '20 at 07:35