Reputation: 11
I am following the tutorial here: https://capacitorjs.com/docs/apis/app I did the following steps:
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="@string/custom_url_scheme" />
I always did it that way, and it always build the apk normally, but just when I add the Capacitor APP plugin, the android studio gives an error
I didn't even change the code, I just added the plugin by pnpm install @capacitor/app and npx cap sync
Has anyone ever experienced this? Do you have any ideas on how to proceed?
solutions I tried:
I expected to compile the app/apk normally, I'm trying to use the backButton event
Upvotes: 1
Views: 978
Reputation: 11
As I am using pnpm, it downloaded version 5 of @capacitor/app, and my capacitor was on version 4.7.1, they are incompatible, I downgraded @capacitor/app to 4.1.1 and everything was resolved.
Another thing, in the official tutorial it says to add those 4 lines, but when installing the app, there's no way to open it and it doesn't appear in the list of apps on the phone, so I had to remove the 4 lines
Upvotes: 0