Describe the bug
I was building app for android by following tutorial and having a trouble with android studio.
To Reproduce
Follow the tutorial until step 2. https://quasar.dev/quasar-cli/developing-capacitor-apps/preparation#2.-Add-Capacitor-Quasar-Mode
Move to step 3, and type. $ quasar dev -m capacitor -T android
androidStudioPath error, type $ quasar dev -m capacitor -T android again. Android stuido has opened and Manifest merge failed error has been thrown.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.2.0] AndroidManifest.xml:24:18-86 value=(androidx.core.app.CoreComponentFactory).
Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:5:5-44:19 to override.
2. above, and type npx cap add android -> open android studio manually didn't throw the error. And able to build SPA.Expected behavior
Screenshots

Platform (please complete the following information):
OS: Windows 10 Pro
Node: 12.16.1
NPM: 6.13.4
Yarn: 1.22.4
Browsers: Firefox
AndroidStudio: 3.6.2
Can confirm, I've also been receiving this error. Fixing the open-ide file also worked for opening Android Studio.
Enabling androidX worked for the manifest error, but caused the app not to boot up. Will try using npx now.
I reviewed some commits. The open package for opening AndroidStudio was updated, and fixed one of it's own bugs which involved the use of double-quotes for paths.
So, I guess, the fix for this is to just remove the double quotes from open-ide.js
EDIT:
Found Capacitor shifted to using Android X. Building the app inside of Android Studio as an Android X project works, and removes the manifest error. Seems to be the cause?
To build as Android X in Android Studio:
Top Menu > Refactor > Migrate to Android X
https://github.com/ionic-team/capacitor/releases
@Dinwy
Fix will be available in "@quasar/app" v1.7.0
https://github.com/quasarframework/quasar/issues/6790
I fixed it by
1.In AndroidManifest.xml replace android:name="android.support.v4.content.FileProvider" with android:name="androidx.core.content.FileProvider"
According to https://ionicframework.com/blog/announcing-capacitor-2-0/ AndroidX is supported in the 2.0 release of capacitor.
Now I am not very knowledgeable about this, but I noticed that my package.json has
"dependencies": {
"@capacitor/android": "^2.1.2",
"@capacitor/cli": "^1.0.0",
"@capacitor/core": "^1.0.0"
}
Which leads me to believe that quasar uses the last 1.X version of capacitor cli to generate the capacitor-project? Would using the latest version to generate the project files help resolve issues like this?
EDIT: found this open PR https://github.com/quasarframework/quasar/pull/6808
@rstoenescu please allow me to ask: what was changed in "@quasar/app" v1.7.0 regarding this issue? I'm running 1.9.4 and have trouble with capacitor "Manifest merger failed".
```$quasar info
Operating System - Linux(5.6.15-1-MANJARO) - linux/x64
NodeJs - 12.17.0
Global packages
NPM - 6.14.5
yarn - 1.22.4
@quasar/cli - 1.0.7
cordova - Not installed
Important local packages
quasar - 1.12.2 -- Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time
@quasar/app - 1.9.4 -- Quasar Framework local CLI
@quasar/extras - 1.8.1 -- Quasar Framework fonts, icons and animations
```
I see a lot of activity for app v2, including capacitor upgrades. Should I wait and test again when it is released (or is it still too far from release)? Your insight would be much appreciated :)
It鈥檚 just a few days away.
Most helpful comment
https://github.com/quasarframework/quasar/issues/6790
I fixed it by
1.In AndroidManifest.xml replace android:name="android.support.v4.content.FileProvider" with android:name="androidx.core.content.FileProvider"
android.useAndroidX=true
android.enableJetifier=true