The library enforces androidX, which crashes every react-native app
See original GitHub issueThis library depends on the latest of com.google.android.gms and com.google.firebase:firebase-messaging which on their turn have been updated to use androidx libraries. Since React-Native is not yet ready for AndroidX (currently on RC). Using this library crashes every build of your app. The solution would be to not use latest as dependencies in build.gradle for this project. Our for every project that uses this project define this in buildscript { ext { … } }:
googlePlayServicesVersion = "16.0.0"
firebaseVersion = "17.0.0"
` Execution failed for task ‘:app:processDebugManifest’.
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 <application> element at AndroidManifest.xml:7:5-138 to override. `
The dependencies for react-native-push-notification:
+--- project :react-native-push-notification
| +--- com.android.support:appcompat-v7:28.0.0 (*)
| +--- com.facebook.react:react-native:+ -> 0.59.9 (*)
| +--- com.google.android.gms:play-services-gcm:+ -> 17.0.0
| | +--- androidx.collection:collection:1.0.0
| | | \--- androidx.annotation:annotation:1.0.0
| | +--- androidx.core:core:1.0.0
| | | +--- androidx.annotation:annotation:1.0.0
| | | +--- androidx.collection:collection:1.0.0 (*)
| | | +--- androidx.lifecycle:lifecycle-runtime:2.0.0
| | | | +--- androidx.lifecycle:lifecycle-common:2.0.0
| | | | | \--- androidx.annotation:annotation:1.0.0
| | | | +--- androidx.arch.core:core-common:2.0.0
| | | | | \--- androidx.annotation:annotation:1.0.0
| | | | \--- androidx.annotation:annotation:1.0.0
| | | \--- androidx.versionedparcelable:versionedparcelable:1.0.0
| | | +--- androidx.annotation:annotation:1.0.0
| | | \--- androidx.collection:collection:1.0.0 (*)
| | +--- androidx.legacy:legacy-support-core-utils:1.0.0
| | | +--- androidx.annotation:annotation:1.0.0
| | | +--- androidx.core:core:1.0.0 (*)
| | | +--- androidx.documentfile:documentfile:1.0.0
| | | | \--- androidx.annotation:annotation:1.0.0
| | | +--- androidx.loader:loader:1.0.0
| | | | +--- androidx.annotation:annotation:1.0.0
| | | | +--- androidx.core:core:1.0.0 (*)
| | | | +--- androidx.lifecycle:lifecycle-livedata:2.0.0
| | | | | +--- androidx.arch.core:core-runtime:2.0.0
| | | | | | +--- androidx.annotation:annotation:1.0.0
| | | | | | \--- androidx.arch.core:core-common:2.0.0 (*)
| | | | | +--- androidx.lifecycle:lifecycle-livedata-core:2.0.0
| | | | | | +--- androidx.lifecycle:lifecycle-common:2.0.0 (*)
| | | | | | +--- androidx.arch.core:core-common:2.0.0 (*)
| | | | | | \--- androidx.arch.core:core-runtime:2.0.0 (*)
| | | | | \--- androidx.arch.core:core-common:2.0.0 (*)
| | | | \--- androidx.lifecycle:lifecycle-viewmodel:2.0.0
| | | | \--- androidx.annotation:annotation:1.0.0
| | | +--- androidx.localbroadcastmanager:localbroadcastmanager:1.0.0
| | | | \--- androidx.annotation:annotation:1.0.0
| | | \--- androidx.print:print:1.0.0
| | | \--- androidx.annotation:annotation:1.0.0
| | +--- com.google.android.gms:play-services-base:17.0.0
| | | +--- androidx.collection:collection:1.0.0 (*)
| | | +--- androidx.core:core:1.0.0 (*)
| | | +--- androidx.fragment:fragment:1.0.0
| | | | +--- androidx.core:core:1.0.0 (*)
| | | | +--- androidx.legacy:legacy-support-core-ui:1.0.0
| | | | | +--- androidx.annotation:annotation:1.0.0
| | | | | +--- androidx.core:core:1.0.0 (*)
| | | | | +--- androidx.legacy:legacy-support-core-utils:1.0.0 (*)
| | | | | +--- androidx.customview:customview:1.0.0
| | | | | | +--- androidx.annotation:annotation:1.0.0
| | | | | | \--- androidx.core:core:1.0.0 (*)
| | | | | +--- androidx.viewpager:viewpager:1.0.0
| | | | | | +--- androidx.annotation:annotation:1.0.0
| | | | | | +--- androidx.core:core:1.0.0 (*)
| | | | | | \--- androidx.customview:customview:1.0.0 (*)
| | | | | +--- androidx.coordinatorlayout:coordinatorlayout:1.0.0
| | | | | | +--- androidx.annotation:annotation:1.0.0
| | | | | | +--- androidx.core:core:1.0.0 (*)
| | | | | | \--- androidx.customview:customview:1.0.0 (*)
| | | | | +--- androidx.drawerlayout:drawerlayout:1.0.0
| | | | | | +--- androidx.annotation:annotation:1.0.0
| | | | | | +--- androidx.core:core:1.0.0 (*)
| | | | | | \--- androidx.customview:customview:1.0.0 (*)
| | | | | +--- androidx.slidingpanelayout:slidingpanelayout:1.0.0
| | | | | | +--- androidx.annotation:annotation:1.0.0
| | | | | | +--- androidx.core:core:1.0.0 (*)
| | | | | | \--- androidx.customview:customview:1.0.0 (*)
| | | | | +--- androidx.interpolator:interpolator:1.0.0
| | | | | | \--- androidx.annotation:annotation:1.0.0
| | | | | +--- androidx.swiperefreshlayout:swiperefreshlayout:1.0.0
| | | | | | +--- androidx.annotation:annotation:1.0.0
| | | | | | +--- androidx.core:core:1.0.0 (*)
| | | | | | \--- androidx.interpolator:interpolator:1.0.0 (*)
| | | | | +--- androidx.asynclayoutinflater:asynclayoutinflater:1.0.0
| | | | | | +--- androidx.annotation:annotation:1.0.0
| | | | | | \--- androidx.core:core:1.0.0 (*)
| | | | | \--- androidx.cursoradapter:cursoradapter:1.0.0
| | | | | \--- androidx.annotation:annotation:1.0.0
| | | | +--- androidx.legacy:legacy-support-core-utils:1.0.0 (*)
| | | | +--- androidx.annotation:annotation:1.0.0
| | | | +--- androidx.loader:loader:1.0.0 (*)
| | | | \--- androidx.lifecycle:lifecycle-viewmodel:2.0.0 (*)
| | | +--- com.google.android.gms:play-services-basement:17.0.0
| | | | +--- androidx.collection:collection:1.0.0 (*)
| | | | +--- androidx.core:core:1.0.0 (*)
| | | | \--- androidx.fragment:fragment:1.0.0 (*)
| | | \--- com.google.android.gms:play-services-tasks:17.0.0
| | | \--- com.google.android.gms:play-services-basement:17.0.0 (*)
| | +--- com.google.android.gms:play-services-basement:17.0.0 (*)
| | +--- com.google.android.gms:play-services-iid:[17.0.0] -> 17.0.0
| | | +--- androidx.collection:collection:1.0.0 (*)
| | | +--- androidx.core:core:1.0.0 (*)
| | | +--- com.google.android.gms:play-services-base:17.0.0 (*)
| | | +--- com.google.android.gms:play-services-basement:17.0.0 (*)
| | | +--- com.google.android.gms:play-services-stats:17.0.0
| | | | +--- androidx.legacy:legacy-support-core-utils:1.0.0 (*)
| | | | \--- com.google.android.gms:play-services-basement:17.0.0 (*)
| | | \--- com.google.android.gms:play-services-tasks:17.0.0 (*)
| | \--- com.google.android.gms:play-services-stats:17.0.0 (*)
| +--- me.leolin:ShortcutBadger:1.1.8
| \--- com.google.firebase:firebase-messaging:+ -> 19.0.0
| +--- androidx.collection:collection:1.0.0 (*)
| +--- androidx.core:core:1.0.0 (*)
| +--- com.google.android.gms:play-services-basement:17.0.0 (*)
| +--- com.google.android.gms:play-services-tasks:17.0.0 (*)
| +--- com.google.firebase:firebase-common:18.0.0
| | +--- androidx.annotation:annotation:1.0.0
| | +--- androidx.collection:collection:1.0.0 (*)
| | +--- androidx.core:core:1.0.0 (*)
| | +--- com.google.android.gms:play-services-basement:17.0.0 (*)
| | +--- com.google.android.gms:play-services-tasks:17.0.0 (*)
| | \--- com.google.auto.value:auto-value-annotations:1.6.3
| +--- com.google.firebase:firebase-iid:[19.0.0] -> 19.0.0
| | +--- androidx.collection:collection:1.0.0 (*)
| | +--- androidx.core:core:1.0.0 (*)
| | +--- androidx.legacy:legacy-support-core-utils:1.0.0 (*)
| | +--- com.google.android.gms:play-services-basement:17.0.0 (*)
| | +--- com.google.android.gms:play-services-stats:17.0.0 (*)
| | +--- com.google.android.gms:play-services-tasks:17.0.0 (*)
| | +--- com.google.firebase:firebase-common:18.0.0 (*)
| | \--- com.google.firebase:firebase-iid-interop:17.0.0
| | +--- com.google.android.gms:play-services-base:17.0.0 (*)
| | \--- com.google.android.gms:play-services-basement:17.0.0 (*)
| \--- com.google.firebase:firebase-measurement-connector:18.0.0
| \--- com.google.android.gms:play-services-basement:17.0.0 (*)
Just to clearify: I solved this issue by targeting the the googlePlayServicesVersion and firebaseVersion in build.gradle:
buildscript {
ext {
//buildToolsVersions, sdk version, etc
googlePlayServicesVersion = "16.0.0"
firebaseVersion = "17.0.0"
}
//repositories and dependencies
}
Issue Analytics
- State:
- Created 4 years ago
- Reactions:8
- Comments:15 (1 by maintainers)
Top GitHub Comments
This is a shit update
Hey everybody. I solved the issue updating the build.gradle as follows:
Replace the
implementation project(":react-native-push-notification")
section with:The issue is caused because react-native-push-notifications is using
com.google.android.gms:play-services-gcm:+
that apparently was updated recently with breaking changes.More info on this issue