1

I'm new to Android Dev and am following developer.android.com/training. I'm at the "starting another activity" section and whenever I try to enter "import android.view.View;" into MainActivity.Java, Eclipse crashes on me. Specifically I can type in "import android" and once I add the period it crashes. Am I missing or need to install additional files? My OS is Linux Mint.

Thanks for your help

Beginning of the error log that was generated:

# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007fb090ea7c91, pid=2473, tid=140399027877632
#
# JRE version: 7.0_25-b30
# Java VM: OpenJDK 64-Bit Server VM (23.7-b01 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  [libsoup-2.4.so.1+0x6ac91]  soup_session_feature_detach+0x11
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
Joshr
  • 41
  • 4

2 Answers2

1

I tried looking at the error log more closely and after searching this line:

C [libsoup-2.4.so.1+0x6ac91]  soup_session_feature_detach+0x11

I came across this solution.

Adding the following to my eclipse.ini file fixed the problem, though I am clueless as to how or why...

-Dorg.eclipse.swt.browser.DefaultType=mozilla
Community
  • 1
  • 1
Joshr
  • 41
  • 4
0

I don't typically type in import statements. In Eclipse I use the Ctrl + Shift + O shortcut that will bring in all the missing imports.

Do you have your environment variables set, something like

setenv PATH /usr/local/jdk1.6.0_15/bin:$PATH
setenv JAVA_HOME /usr/local/jdk1.6.0_15
Peter Birdsall
  • 3,159
  • 5
  • 31
  • 48
  • I didn't have those set up but I added the following to my .bashrc file (I learned about this file just yesterday): export PATH=/opt/adt-bundle-linux/sdk/tools:/opt/adt-bundle-linux/sdk/platform-tools:$PATH export JAVA_HOME=/usr/lib/jvm/jdk1.7.0_51/bin/java Eclipse is still crashing once I enter the period after "import android" I even tried starting over with a fresh install of Linux Mint 16, JDK7, and the Android SDK. Any other suggestions? I've spent a lot of time trying to figure it out and its getting quite frustrating. – Joshr Jan 23 '14 at 00:47