react-native-push-notification icon indicating copy to clipboard operation
react-native-push-notification copied to clipboard

Android Build Error : D8: Program type already present: android.support.v4.app.INotificationSideChannel$Stub$Proxy

Open dragonStandard123 opened this issue 7 years ago • 9 comments

Suddenly I got this error .

D8: Program type already present: android.support.v4.app.INotificationSideChannel$Stub$Proxy

After I unlinked this module, the building finished successfully. This module was linked when I had created the project a long time ago, and worked well till this morning. I did nothing to configure the project.

React Native: 0.59.5, React Native Push Notification : 3.1.3 buildToolsVersion = "28.0.3" supportLibVersion = "28.0.0" compileSdkVersion = 28

So I have migrated the project to AndroidX, then other modules were crashed. How can fix this?

dragonStandard123 avatar Jun 18 '19 12:06 dragonStandard123

Same there.

alp1396 avatar Jun 18 '19 13:06 alp1396

Same here !!!

mtzfactory avatar Jun 18 '19 15:06 mtzfactory

upvote, same here too!

tietthinh avatar Jun 18 '19 17:06 tietthinh

same here guys (

alexiosladikos avatar Jun 18 '19 17:06 alexiosladikos

Ok I found this post #1091 I just follow this and it work like charm! tltr: change this 2 value in your build.gradle

googlePlayServicesVersion = "16.1.0"  
firebaseVersion = "17.6.0" 

tietthinh avatar Jun 18 '19 17:06 tietthinh

There are a bunch of older packages that would conflict with AndroidX, and since RN v0.60 is still in beta/RC, it's better to downgrade Google Play and Firebase.

Add this to your gradle.properties and update gradle if needed based on your react-native version.

googlePlayServicesVersion=16.1.0
firebaseVersion=17.6.0

details: https://github.com/facebook/react-native/issues/25301#issuecomment-503269743

AndyShi12 avatar Jun 18 '19 19:06 AndyShi12

Hello , AndroidX has some conflicts with numerous package, including react-native-device-info, and react-native-push-notification

Below the build.gradle of this dependency, binding to last play-services-gcm version "+" :

implementation "com.google.android.gms:play-services gcm:${safeExtGet('googlePlayServicesVersion', '+')}"

solution working here :

Modify in build.gradle :

buildscript {
    ext {
        googlePlayServicesVersion = "16.+"
        firebaseVersion = "17.3.4"

and as a resolution :

configurations.all {
    resolutionStrategy {
        force "com.google.android.gms:play-services-basement:16.0.1"
        force "com.google.android.gms:play-services-base:16.0.1"
        force "com.google.android.gms:play-services-stats:16.0.1"
        force "com.google.android.gms:play-services-gcm:16.0.0"
    }
}

May need to run cd android && gradlew clean

MonkeyMoneyFrance avatar Jun 19 '19 10:06 MonkeyMoneyFrance

Thank you @MonkeyMoneyFrance. That helped me resolve the issue i was having.

markrickert avatar Jul 08 '19 23:07 markrickert

Thanks @MonkeyMoneyFrance you saved me.

IonutBurlacu avatar Jul 15 '19 15:07 IonutBurlacu