Ubuntu – Android Studio 2.2 frequently crashes on Ubuntu 16.04

16.04android-studiojava

I was using Android Studio on my Ubuntu 14.04 64bit. That worked fine. Recently I installed Ubuntu 16.04 64bit, and I also installed Android Studio 2.2 on my PC. But my Android Studio crashes frequently. It closes instantly.

My java version:

java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)

Also I created $JAVA_HOME variable. I set right jdk location in my Studio. But it frequently crashes. Here with I have attached Studio error report.

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007ff6aba86384, pid=3955, tid=0x00007ff684e6d700
#
# JRE version: OpenJDK Runtime Environment (8.0_76-b03) (build 1.8.0_76-release-b03)
# Java VM: OpenJDK 64-Bit Server VM (25.76-b03 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# V  [libjvm.so+0x895384]  PhaseCCP::analyze()+0x274
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
#

---------------  T H R E A D  ---------------

Current thread (0x00007ff6a40fa800):  JavaThread "C2 CompilerThread1" daemon [_thread_in_native, id=3968, stack(0x00007ff684d6d000,0x00007ff684e6e000)]

siginfo: si_signo: 11 (SIGSEGV), si_code: 128 (SI_KERNEL), si_addr: 0x0000000000000000...

I don't know why this problem occurs. Please help me to solve this issue.

Best Answer

as I see you're trying to run Android Studio using Java SE. PLease install Oracle Java 8 Java Development Kit (JDK) and set it in Android Studio using File_>Project Structure.