In case anyone stumbles on this, for me checking the "Always install with package manager" in the "Edit configurations" window seems to stop such JNI errors. Not sure about any side-effects to this.