0

After installing Android Studio on Linux and creating the first Hello world project

I keep getting the following error:

"Process 'command '/home/marc/Downloads/AndroidStudio/android-studio/jre/bin/java'' finished with non-zero exit value 2"

This is a fresh Android Stuido install and it is the first project. I have read a lot on this topic but none of the solutions worked for me.

I tried:

  • For more then a few hours to find a solution online (mainly Stack Overflow)
  • Change AS compiler setting 'heap size' to 1024 and Additional build process to VM Options to -Xmx512m
  • Deleted the MyFirstApp project and started over again. Re-installed Studio
  • Study the AS idea.log
  • 'Run' the app, which resulted in: "Error running build: Module 'MyFirstApp' is not backed by gradle"
  • Restart AS and PC
  • Using multidex (even when this is just the Hello world app)

Version info:
Android Studio Build: 2.2.1
Version of Android Studio Gradle Plugin: 2.2.1
Version of Gradle: 2.14.1
Version of Java: 8 Update 101
OS: Ubuntu 16.04.1 LTS (AMD CPU)

Now I am out of options.

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
  • Many thanks cricket007! although i have been hours on stackoverflow, i missed that other (duplicate) question and answer. 19:27:35 Gradle sync completed!!!!!! – Marc de Ruyter Oct 19 '16 at 17:32

1 Answers1

1

Java: 8 Update 101

You have that installed but you are using the JRE that in bundled with Android Studio

/home/marc/Downloads/AndroidStudio/android-studio/jre/bin/java

Update your IDE's SDK settings for the correct version of Java.

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245