--- a/sdklib/build.gradle
+++ b/sdklib/build.gradle
@@ -45,6 +45,10 @@
     test.resources.srcDir 'src/test/java'
 }
 
+compileJava {
+    options.compilerArgs << '--add-exports' << 'java.base/sun.security.pkcs=ALL-UNNAMED' << '--add-exports' << 'java.base/sun.security.x509=ALL-UNNAMED' << '--add-exports' << 'java.base/sun.security.util=ALL-UNNAMED'
+}
+
 task initSdkForTests(type: JavaExec) {
     classpath = sourceSets.main.runtimeClasspath
     main = "com.android.sdklib.tool.SdkDownloader"
