What you mention can sometimes occur when using a local Java SDK that is higher than the one used in the application.
Here is an example of a similar situation:
Java 9 introduced restrictions when accessing resources across packages.
Such restriction means that if an SDK is using
setAccessible for a class on a separate package, then you get the error that you’ve reported.
Google makes use of reflexion in their AppEngine SDK, and therefore, we are forced to use Java 8 for now. I imagine that they’ll update bit in the future.
If you are in this situation, you have to downgrade the local Java SDK to be 8. Such downgrade may not be desirable if you have other projects that rely on newer versions of Java. On the other hand, if you are an Android developer, there is only support for Java 8, so it’s safe to downgrade. Maybe one day we can upgrade :]
If you want to switch versions quickly or to have an easier downgrade, sdkman is a great tool
Let me know if it works for you.