1

I am starting Android Studio (for the first time after unzipping the file that I downloaded from the Android Studio website) by calling ./studio.sh in the android-studio/bin directory.

I'm getting the following error:

Java HotSpot(TM) 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
WARN: Unknown class loader: jdk.internal.loader.ClassLoaders$AppClassLoader
WARN: Unknown class loader: jdk.internal.loader.ClassLoaders$PlatformClassLoader

Start Failed: Internal Error. Please report to https://code.google.com/p/android/issues

java.lang.AssertionError: Internal error: ClassLoader implementation has been altered
at com.intellij.util.lang.UrlClassLoader.isRegisteredAsParallelCapable(UrlClassLoader.java:72)
at com.intellij.util.lang.UrlClassLoader.<init>(UrlClassLoader.java:179)
at com.intellij.util.lang.UrlClassLoader$Builder.get(UrlClassLoader.java:151)
at com.intellij.ide.BootstrapClassLoaderUtil.initClassLoader(BootstrapClassLoaderUtil.java:69)
at com.intellij.ide.Bootstrap.main(Bootstrap.java:32)
at com.intellij.idea.Main.main(Main.java:119)


Also, an UI exception occurred on attempt to show above message:
java.lang.ExceptionInInitializerError
at com.intellij.util.concurrency.AtomicFieldUpdater.<clinit>(AtomicFieldUpdater.java:41)
at com.intellij.util.containers.LockFreeCopyOnWriteArrayList.<clinit>(LockFreeCopyOnWriteArrayList.java:54)
at com.intellij.util.containers.ContainerUtil.createConcurrentList(ContainerUtil.java:2611)
at com.intellij.util.containers.ContainerUtil.createLockFreeCopyOnWriteList(ContainerUtil.java:2465)
at com.intellij.openapi.util.registry.RegistryValue.<init>(RegistryValue.java:36)
at com.intellij.openapi.util.registry.Registry.get(Registry.java:48)
at com.intellij.openapi.util.registry.Registry.is(Registry.java:55)
at com.intellij.util.ui.UIUtil.blockATKWrapper(UIUtil.java:112)
at com.intellij.util.ui.UIUtil.<clinit>(UIUtil.java:99)
at com.intellij.idea.Main.showMessage(Main.java:368)
at com.intellij.idea.Main.showMessage(Main.java:341)
at com.intellij.idea.Main.showMessage(Main.java:320)
at com.intellij.idea.Main.main(Main.java:122)
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make private jdk.internal.reflect.ConstructorAccessor java.lang.reflect.Constructor.acquireConstructorAccessor() accessible: module java.base does not "opens java.lang.reflect" to unnamed module @7c29daf3
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:335)
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:278)
at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:196)
at java.base/java.lang.reflect.Method.setAccessible(Method.java:190)
at com.intellij.util.ReflectionUtil.findMethod(ReflectionUtil.java:265)
at com.intellij.util.ReflectionUtil.getDeclaredMethod(ReflectionUtil.java:279)
at com.intellij.util.ReflectionUtil.<clinit>(ReflectionUtil.java:422)
... 13 more

I am using Oracle version 9 of java

java version "9-ea"
Java(TM) SE Runtime Environment (build 9-ea+162)
Java HotSpot(TM) 64-Bit Server VM (build 9-ea+162, mixed mode)

Edit: Since I am using 64-bit version of Ubuntu, I also installed some 32-bit libraries with the following command:

$ sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1

  • why aren't you installing with umake? – Thufir Oct 25 '17 at 13:40
0

It is a bug (more like a deprecated feature) of JDK 9. If using JDK 9 is not a must, I would suggest to use JDK 8 instead.

Check this step by step guide by Digital Ocean to setup JDK in ubuntu.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.