Ionic capacitor run android doesn't work

I’m tring to do a rock scisor paper as my first app but I can’t run on emulator through ionic run cap android, I always get the same error

Execution failed for task ':app:processDebugMainManifest'
Unable to make field private final java.lang.String accessible: module java.base does not "opens" to unnamed module @34455b08

I’ve seen a few issues of this popping up around stack overflow lately. It seems like it may be related to the latest JDK that’s been released. Did you manually install the JDK or did you install Android Studio and let it install and manage the JDK for you?