Program type already present: androidx.versionedparcelable.NonParcelField

Based on my research couldn't not find an easy way or should I say a correct way to draw back from androidx, to solve the above issue just add the following to your gradle.properties

android.useAndroidX=true
android.enableJetifier=true

That might cause another issue like

Execution failed for task ':react-native-navigation:compileReactNative57_5DebugJavaWithJavac'

the reason of this error, if it occured, after migrating your android project to androidx, many of your react-native libraries ship native Java code and have not been updated, updating it manually is tedious, I was able to do so by using this library jetifier simply by running

npm i --save-dev jetifier
npx jetify 

In my case there were still some libraries causing some issues such us react-native-fast-image, as a workaround, I created a gradle.properties inside /node_modules/react-native-fast-image/android and deactivated AndroidX and Jetifier for this module:

android.useAndroidX=false
android.enableJetifier=false

The answer that Ahmed posted is a great solution once you've migrated to AndroidX. In my case I found out that only one library in my application was using AndroidX from this thread

In short my solution was to simply yarn upgrade react-native-device-info@latest The app build as expected after rebuilding it