Task :app:processDebugGoogleServices
Parsing json file: D:\WWW\htdocs\schoolapp\brightschoolapp\android\app\google-services.json
Task :app:transformDexArchiveWithExternalLibsDexMergerForDebug FAILED
D8: Program type already present: android.support.v4.app.INotificationSideChannel$Stub$Proxy
FAILURE: Build failed with an exception.
React Native version:
React Native Environment Info:
System:
OS: Windows 10
CPU: (4) x64 Intel(R) Core(TM) i7-6500U CPU @ 2.50GHz
Memory: 807.04 MB / 7.92 GB
Binaries:
npm: 6.5.0-next.0 - C:\Program Files\nodejs\npm.CMD
IDEs:
Android Studio: Version 3.2.0.0 AI-181.5540.7.32.5056338-->
1.
2.
D8: Program type already present: android.support.v4.app.INotificationSideChannel$Stub$Proxy
I'm also experiencing this very same error.
It is the react-native-device-info and react-native push notification causing this error to resolve
Refer here.
https://github.com/zo0r/react-native-push-notification/pull/1092#issuecomment-503657080
@HarshitMadhav please clearly define which file to be modify ?
@sumangautam5555 are you using these react-native-device-info and react-native push notification?
@HarshitMadhav
no ,
i'm using react-native-fcm for notification
"nachos-ui": "^0.2.0-beta.1",
"native-base": "^2.12.1",
"react": "16.6.3",
"react-native": "^0.57.1",
"react-native-calendars": "^1.191.0",
"react-native-camera": "^1.13.1",
"react-native-fcm": "^16.2.4",
"react-native-gesture-handler":"^1.3.0",
"react-native-htmlview": "^0.13.0",
"react-native-maps": "^0.23.0",
"react-native-qrcode-scanner": "^1.2.1",
"react-native-sound": "^0.10.12",
"react-native-ui-kitten": "^3.1.4",
"react-native-vector-icons": "^6.5.0",
"react-navigation": "^3.11.0"
@sumangautam5555 that means yes you are using notifications.
refer to this thread here https://github.com/zo0r/react-native-push-notification/pull/1092
Although the thread is of react-native-push-notification but check it and read it out. It helped me too.
@HarshitMadhav
try all these comment (zo0r/react-native-push-notification#1092) but same error
Task :app:transformDexArchiveWithExternalLibsDexMergerForDebug FAILED
D8: Program type already present: android.support.v4.app.INotificationSideChannel$Stub
FAILURE: Build failed with an exception.
@sumangautam5555 also disable the androidx implementation to the project.
HarshitMadhav how to disable the androidx
@sumangautam5555 Facing the same issue. Any fix yet?
@sumangautam5555 Updating the react-native-device-info package to latest worked for me.
@Saikumar-Hexaware i'm not used this package react-native-device-info
@sumangautam5555 add following 2 lines in gradle.properties file.
android.useAndroidX=false
android.enableJetifier=false
@sumangautam5555 Updating the react-native-device-info package to latest worked for me.
Worked on me too.
The issue is due to some dependencies having an internal dependency on Google APIs.
https://developers.google.com/android/guides/releases In my case it was com.google.firebase:firebase-core:+ -> 17.0.0
This can be found out by simply analyzing all the package dependencies and check for androidx dependent libraries.
You can go to android folder of project and execute the following command to find this
./gradlew app:dependencies | grep androidx
I fixed the issue by adding the following code in app/build.gradle
configurations.all {
resolutionStrategy {
force "com.google.firebase:firebase-core:11.4.2"
force "com.google.firebase:firebase-analytics:11.4.2"
force "com.google.android.gms:play-services-gcm:16.0.0"
}
}
1+
Updating the react-native-device-info package to latest worked for me.
same issues without use react-native-device-info and any push dependencies
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.
Most helpful comment
@sumangautam5555 Updating the react-native-device-info package to latest worked for me.