I updated \'android.support:appcompat-v7\' to 28.0.0.
But it brought an error from the build.
Attribute application@appComponentFactory
If you are not using react-native-device-info, but have the same error, its probably another library in your project.
Use this to find the library in question:
cd your-react-native-project/android
./gradlew app:dependencies > deps.txt
Then inspect the deps.txt file for keyword "androidx". Then you can quickly find which native module is using it.
In my case it was react-native-camera, for which solution above was good but not enough so I had to add this to local.properties:
firebaseVersion=17.6.0
googlePlayServicesVersion=16.1.0
googlePlayServicesVisionVersion=16.2.0
EDIT:
After these fixes, running ./gradlew app:dependencies > deps.txt and searching for "androidx" returned no results - this is what we are looking for.
After running clean on the project, build worked.