I want to implement google maps in my app.I added a google maps activity and created a key.When using MapsAcivity.java file shown some error codes.I tried many solutions but didn't worked.
MapsAcivity-error code
private GoogleMap mMap = ((SupportMapFragment)getSupportFragmentManager().findFragmentById(R.id.map)).getMap();
Console error
Task :app:processDebugManifest FAILED
Error: Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91 is also present at [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory). Suggestion: add 'tools:replace="android:appComponentFactory"' to element at AndroidManifest.xml:16:5-45:19 to override.