I am trying to debug my Nativescript app using command 'tns debug android' but build process keeps failing. Error stack trace:
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:17:2-42:16 to override.FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':app:processDebugManifest'. Manifest merger failed : 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:17:2-42:16 to override.
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 15s Unable to apply changes on device: 18d388bb7cf4. Error is: Command gradlew.bat failed with exit code 1.
I have followed the steps described in Nativescript docs to set up my dev environment.
Step 1 : npm install -g nativescript
Step 2 : @powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-objectnet.webclient).DownloadString('https://www.nativescript.org/setup/win'))"
Step 3 : npm install
Step 4 : tns debug android
I have tried this and this too but no luck.
I have also tried to remove/uninstall everything including Nativescript, and started from scratch then also it is not working.
Please guide what should I do to resolve the error.