When building my project on android studio, it asks me to accept the license agreements and complete the installation of the missing components using the Android Studio SDK Manager.
When I run "./sdkmanager --licenses", I have the "Could not find or load main class java.se.ee" error.
I found a lot of similar issues on stackoverflow, but non of the solutions provided worked for me.
I already tried: 1- downgrade to java 8
2- export JAVA_OPTS='-XX:+IgnoreUnrecognizedVMOptions --add-modules java.se.ee'
3- change sdkmanager file by adding : DEFAULT_JVM_OPTS='"-Dcom.android.sdklib.toolsdir=$APP_HOME" -XX:+IgnoreUnrecognizedVMOptions --add-modules java.se.ee'
I had the same issue.
And solved by following the below steps:
1) Install java 8
2) Run command in terminal
unset JAVA_OPTS
3) Then run command in terminal
./sdkmanager --licenses
Well, it's been 4 months since you asked the question. You must have found the answer, but here is a way easy solution for others who are still looking for it:
JAVA_OPTS='-XX:+IgnoreUnrecognizedVMOptions'
And, Voila the issue is solved!
Why this solved the problem?
Well I don't know the exact reason but, I also don't know why we tend to add java.se.ee through "--add-modules java.se.ee"
, I tried removing it and error was gone! Maybe because java11 removed EE module, and it was depreciated in java10.
It was just a blind shot which worked!, If anyone knows the proper reason please comment it out!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With