I tried most the answers provided in stackoverflow as well as github from adding
multiDexEnabled true
dexOptions{javaMaxHeapSize "4g"}
but there was no luck, I think my problem is with the dependencies. The actual error I am getting when I run cd android ./gradlew clean then gradlew assembldebug or react-native run-android is
What went wrong: Execution failed for task':app:transformClassesWithMultidexlistForDebug'. com.android.build.api.transform.TransformException: Error while generating the main dex list.
Building in Android Studio shows the following Error:
Program type already present: androidx.versionedparcelable.CustomVersionedParcelable
adding
android.useAndroidX=true
android.enableJetifier=true
causes more problems since most of my react-native libraries that I used in my project not translated to androidx
Execution failed for task ':react-native-navigation:compileReactNative57_5DebugJavaWithJavac'
so my intention is to draw back from androidx, is there a way to do so?