最近開始android的開發學習,當然要先從java入手了。我選擇eclips作為開發的IDE,在測試java代碼範例時,如果My Code是可以出現系統自動代碼補齊時eclips就會立刻閃退。
剛開始不知道怎麼回事以為是自己不小心誤操作吧介面給關了,可是發生了好幾次。之後通過shell把eclips啟動,這時可以看到eclips閃退時的log:
paky@paky-ubuntu:~/android/eclipse$ ./eclipse
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0xa110186d, pid=7618, tid=3075786496
#
# JRE version: OpenJDK Runtime Environment (7.0_55-b14) (build 1.7.0_55-b14)
# Java VM: OpenJDK Client VM (24.51-b03 mixed mode, sharing linux-x86 )
# Problematic frame:
# C [libsoup-2.4.so.1+0x5486d] soup_session_feature_detach+0x1d
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home/paky/android/eclipse/hs_err_pid7618.log
#
# If you would like to submit a bug report, please include
# instructions on how to reproduce the bug and visit:
# http://icedtea.classpath.org/bugzilla
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
已放棄 (核心已轉儲)
paky@paky-ubuntu:~/android/eclipse$ ./eclipse
到網上了了很多方法來解決這個問題,最後發現有人說要在eclips.ini裡面增加:-Dorg.eclipse.swt.browser.DefaultType=mozilla
從字面來看就是解決IDE的自動補齊函數和變數的瀏覽外掛程式預設要用mozilla。照著這個方法試試,果然問題消失了。