I got a problem when trying to build a signed apk with an error log like this
Error: Exception in thread "main" java.lang.IllegalAccessError: class com.android.apksig.internal.apk.v1.V1SchemeSigner (in unnamed module —) cannot access class sun.security.x509.AlgorithmId (in module java.base) because module java.base does not export sun.security.x509 to unnamed module —
at com.android.apksig.internal.apk.v1.V1SchemeSigner.getSupportedAlgorithmId(V1SchemeSigner.java:625)
at com.android.apksig.internal.apk.v1.V1SchemeSigner.<clinit>(V1SchemeSigner.java:541)
at com.android.apksig.DefaultApkSignerEngine.<init>(DefaultApkSignerEngine.java:149)
at com.android.apksig.DefaultApkSignerEngine.<init>(DefaultApkSignerEngine.java:52)
at com.android.apksig.DefaultApkSignerEngine$Builder.build(DefaultApkSignerEngine.java:902)
at com.android.apksig.ApkSigner.sign(ApkSigner.java:259)
at com.android.apksig.ApkSigner.sign(ApkSigner.java:178)
at com.android.apksigner.ApkSignerTool.sign(ApkSignerTool.java:277)
at com.android.apksigner.ApkSignerTool.main(ApkSignerTool.java:89)