I ran my Android RN project today and was presented with the following error
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
> com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes.
Program type already present: android.support.v4.app.INotificationSideChannel$Stub
I believe that in order to resolve this, it is required to migrate to AndroidX.
I backed up my project and attempted to do it with Android Studio to no avail. I also tried setting it manually in my gradle.properties
file
android.enableJetifier=true
android.useAndroidX=true
After this I tried removing supported libraries from my app/build.gradle, as well as setting targeted targetSdkVersion
to 28.
These attempts resulted in more errors for me, specifically this one
Execution failed for task ':react-native-navigation:compileReactNative57_5DebugJavaWithJavac'.
I am using React Native 0.58.6 with Wix Navigation V2. Help would be much appreciated