[Android] Not support new arch react native 0.76.5
After assembleRelease and installing in real device and emulator with release.apk I got the same error for every fresh installing and when recieving notificaiton
react-native 0.76.5
react-native-push-notification 8.1.1
@react-native-firebase/app 21.6.1
@react-native-firebase/messaging 21.6.1
System:
OS: macOS 14.7.1
CPU: (10) arm64 Apple M1 Max
Memory: 140.59 MB / 32.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 18.17.1
path: ~/.nvm/versions/node/v18.17.1/bin/node
Yarn: Not Found
npm:
version: 9.6.7
path: ~/.nvm/versions/node/v18.17.1/bin/npm
Watchman:
version: 2023.12.04.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.15.2
path: /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 24.2
- iOS 18.2
- macOS 15.2
- tvOS 18.2
- visionOS 2.2
- watchOS 11.2
Android SDK:
API Levels:
- "23"
- "27"
- "29"
- "30"
- "31"
- "33"
- "34"
- "35"
Build Tools:
- 28.0.3
- 29.0.2
- 30.0.2
- 30.0.3
- 31.0.0
- 33.0.0
- 33.0.1
- 34.0.0
- 35.0.0
System Images:
- android-29 | Intel x86 Atom_64
- android-29 | Google APIs Intel x86 Atom
- android-30 | ARM 64 v8a
- android-30 | Google APIs ARM 64 v8a
- android-30 | Google Play ARM 64 v8a
- android-31 | Google APIs ARM 64 v8a
- android-31 | Google Play ARM 64 v8a
- android-33 | ARM 64 v8a
- android-33 | Google APIs ARM 64 v8a
- android-34 | ARM 64 v8a
- android-34 | Google APIs ARM 64 v8a
- android-34 | Google Play ARM 64 v8a
- android-35 | ARM 64 v8a
- android-35 | Google APIs ARM 64 v8a
- android-35 | Google Play ARM 64 v8a
- android-VanillaIceCream | Google APIs ARM 64 v8a
- android-VanillaIceCream | Google Play ARM 64 v8a
Android NDK: Not Found
IDEs:
Android Studio: 2024.1 AI-241.15989.150.2411.11948838
Xcode:
version: 16.2/16C5032a
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.10
path: /usr/bin/javac
Ruby:
version: 2.6.10
path: /usr/bin/ruby
npmPackages:
"@react-native-community/cli":
installed: 15.1.3
wanted: 15.1.3
react:
installed: 18.3.1
wanted: 18.3.1
react-native:
installed: 0.76.5
wanted: 0.76.5
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: true
iOS:
hermesEnabled: true
newArchEnabled: true
Facing the same issue with below error
- What went wrong: Execution failed for task ':app:checkUatDebugDuplicateClasses'.
A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable Duplicate class android.support.v4.app.INotificationSideChannel found in modules core-1.12.0-alpha05.aar -> core-1.12.0-alpha05-runtime (androidx.core:core:1.12.0-alpha05) and support-compat-27.1.1.aar -> support-compat-27.1.1-runtime (com.android.support:support-compat:27.1.1) Duplicate class android.support.v4.app.INotificationSideChannel$Stub found in modules core-1.12.0-alpha05.aar -> core-1.12.0-alpha05-runtime (androidx.core:core:1.12.0-alpha05) and support-compat-27.1.1.aar -> support-compat-27.1.1-runtime (com.android.support:support-compat:27.1.1) Duplicate class android.support.v4.app.INotificationSideChannel$Stub$Proxy found in modules core-1.12.0-alpha05.aar -> core-1.12.0-alpha05-runtime (androidx.core:core:1.12.0-alpha05) and support-compat-27.1.1.aar -> support-compat-27.1.1-runtime (com.android.support:support-compat:27.1.1) Duplicate class android.support.v4.os.IResultReceiver found in modules core-1.12.0-alpha05.aar -> core-1.12.0-alpha05-runtime (androidx.core:core:1.12.0-alpha05) and support-compat-27.1.1.aar -> support-compat-27.1.1-runtime (com.android.support:support-compat:27.1.1) Duplicate class android.support.v4.os.IResultReceiver$Stub found in modules core-1.12.0-alpha05.aar -> core-1.12.0-alpha05-runtime (androidx.core:core:1.12.0-alpha05) and support-compat-27.1.1.aar -> support-compat-27.1.1-runtime (com.android.support:support-compat:27.1.1) Duplicate class android.support.v4.os.IResultReceiver$Stub$Proxy found in modules core-1.12.0-alpha05.aar -> core-1.12.0-alpha05-runtime (androidx.core:core:1.12.0-alpha05) and support-compat-27.1.1.aar -> support-compat-27.1.1-runtime (com.android.support:support-compat:27.1.1) Duplicate class android.support.v4.os.ResultReceiver found in modules core-1.12.0-alpha05.aar -> core-1.12.0-alpha05-runtime (androidx.core:core:1.12.0-alpha05) and support-compat-27.1.1.aar -> support-compat-27.1.1-runtime (com.android.support:support-compat:27.1.1) Duplicate class android.support.v4.os.ResultReceiver$1 found in modules core-1.12.0-alpha05.aar -> core-1.12.0-alpha05-runtime (androidx.core:core:1.12.0-alpha05) and support-compat-27.1.1.aar -> support-compat-27.1.1-runtime (com.android.support:support-compat:27.1.1) Duplicate class android.support.v4.os.ResultReceiver$MyResultReceiver found in modules core-1.12.0-alpha05.aar -> core-1.12.0-alpha05-runtime (androidx.core:core:1.12.0-alpha05) and support-compat-27.1.1.aar -> support-compat-27.1.1-runtime (com.android.support:support-compat:27.1.1) Duplicate class android.support.v4.os.ResultReceiver$MyRunnable found in modules core-1.12.0-alpha05.aar -> core-1.12.0-alpha05-runtime (androidx.core:core:1.12.0-alpha05) and support-compat-27.1.1.aar -> support-compat-27.1.1-runtime (com.android.support:support-compat:27.1.1)
Go to the documentation to learn how to <a href="d.android.com/r/tools/classpath-sync-errors">Fix dependency resolution errors</a>.
Environment:
React native: 0.76.5 OS: Windows package version:^8.1.1
This is fixed by adding below line in gradle.properties file
Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
This is fixed by adding below line in gradle.properties file
Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
your problem is not related to mine. I decided to change libary to @notifee/react-native for whoever that is facing the same problem I encourage to change the library because this library is not being updated for long
Alternative way to fix problem Duplicate class android.support.v4.app.INotificationSideChannel is to go through all your deps and remove line staring with implementation "com.android.support... in their android/build.gradle dependencies like here and patch-package these changes to ensure that they persist across reinstalls