0

I'm currently trying to set up a Flutter development environment on Arch Linux, but I'm facing some issues.

Environment:

  • OS: Arch Linux
  • Shell: fish
  • Java: OpenJDK 8, OpenJDK 11 (both tried but encountered the same error)
  • Flutter: 3.7.12

Issues:

  • When running the sdkmanager command as a regular user, I encounter the following error: "Error: Main class java.se.ee not found or could not be loaded."
  • On the other hand, when executing sdkmanager with sudo, the error does not occur.
  • The flutter doctor command also shows some Android-related errors.

Attempted solutions:

  • Set ANDROID_HOME and granted permissions to /opt/android-sdk.
  • Changed the permissions of /opt/android-sdk by running chown -R username:usergroup.
  • Used the archlinux-java command to switch Java versions on Arch Linux.

Despite these steps, the issue persists. If anyone knows a solution, I would greatly appreciate your help.

Thank you.

1 Answer 1

0

Self resolved. I unset the following environment variable and it worked.

JAVA_OPTS='-XX:+IgnoreUnrecognizedVMOptions --add-modules java.se.ee'

It seems that the user still had the settings that were set during the trial and error and that was the cause of the problem.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.