I am trying to use some methods and properties of Capacitor but none works in Android, if I try to get the platform with Capacitor.platform it returns “undefined” and it gives me an error if I try to use any method. What could it be?

Note: I tested the app on my cell phone with Android 9 using the command “ionic cap run android -l --external” and also with “ionic cap run android” but it still doesn’t work.