哪个版本的Eclipse适用于Android开发?

6

显然,eclipse 3.6与android sdk不兼容,但我想使用需要此版本eclipse的eclim。有没有任何最近使用eclipse 3.6开发android的经验?对于想要使用vim进行android开发的人有什么建议吗?我会非常感激任何帮助。

4个回答

3
Android SDK页面来看,Eclipse 3.4或3.5似乎是唯一推荐的版本。
但是Helios 应该没问题, 除了一些关于代码辅助缓慢(或内容辅助)的报告。
我建议使用优化的 eclipse.ini以确保良好的性能(但我没有在Android上直接使用过它)。

Pēteris Caune在评论中提到了以下解决方法

  1. 下载
    https://android.googlesource.com/platform/frameworks/base/+archive/<branch>.tar.gz
    其中 <branch> 是在此处列出的之一 (froyo-release 代表 2.2 版本,文件大小约为 113MB):
    https://android.googlesource.com/platform/frameworks/base/+refs
  2. 将 tar 文件中 base/ 目录下的内容提取到 "<path-to-android-sdk>/platforms/android-<api-version>/sources" 中,其中 <api-version> 分别为 8(froyo)、7(eclair)等。
  3. 享受 3.6 版本中快速的内容辅助功能!

3.6版本中的代码辅助确实是一个令人讨厌的问题,但有一个解决方法:http://code.google.com/p/android/issues/detail?id=7850&q=adt&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars#c8 - Pēteris Caune
@Pēteris:感谢你提供的链接。我已在我的答案中包含了解决方法。 - VonC

1

我自2010年10月开始使用Helios(3.6)和eclim进行Android开发,偶尔在自动完成时会导致Eclipse冻结。如果你使用eclim的自动完成功能,这个问题也可能出现在Vim中。

虽然这很烦人,但并不经常发生。我记不清上次它发生是什么时候了,所以我最近一次更新Android工具可能已经修复了这个问题。(如果再次出现,我会留意并尝试Pēteris Caune的解决方法。)


我一直很喜欢eclim。我使用一个Eclipse外部工具来启动vim并源化一个Eclipse设置文件。外部工具参数:

 --servername Viclipse --remote-silent "+runtime visualstudioinvoke.vim" ${resource_loc}

在Eclipse中,我建议设置“常规”>“工作区”>“自动刷新”,以便Eclipse从vim构建您的更改。否则,您会不断收到“文件与文件系统过期”的消息。
visualstudioinvoke.vim中加载的一些代码:
" Centre cursor
normal zz

" Keep up to date on change from external editor
setlocal autoread
" We'll be opened with the full path, but jump to the local directory so
" Lookupfile, etc work better.
cd %:p:h

" Use Eclim's user-defined completion instead of omnicompletion
inoremap <C-Space> <C-x><C-u>


" Eclim menus because I forget the mappings
" imports whatever is needed
menu E&clim.ImportMissing :JavaImportMissing<CR>
menu E&clim.ImportPrettify :JavaImportClean<CR>:JavaImportSort<CR>

" opens javadoc for statement in browser
menu E&clim.JavaDocSearch  :JavaDocSearch -x declarations<CR>

" searches context for statement
menu E&clim.JavaSearchContext :JavaSearchContext<cr>

" validates current java file
menu E&clim.Validate :Validate<CR>

" shows corrections for the current line of java
menu E&clim.JavaCorrect :JavaCorrect<CR>

你可以在github上找到我的vimfiles。

0

我花了一些时间尝试在Helios上运行它,但是没有成功。最好选择Galileo,那个立即就可以工作。


0

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接