Weylon Santana
Weylon Santana

Reputation: 11

Capacitor App Plugin dont let android studio build the apk

I am following the tutorial here: https://capacitorjs.com/docs/apis/app I did the following steps:

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

android studio bug

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

Answers (1)

Weylon Santana
Weylon Santana

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

Related Questions