开发者

What version of eclipse is safe for development for android?

Apparently, eclipse 3.6 doesn't work well with the android sdk, but I'd like to use eclim which requires this version of eclipse. Does anyone have any recent experience developing for android with eclipse 3.6? Recommendations for someone who wants to use vim f开发者_StackOverflowor android development? I'd appreciate any help.


From the Android SDK page, Eclipse 3.4 or 3.5 seem to be the only recommended version.

But Helios should be fine, except for some reports regarding slow code assist (or content assist).

I would recommend using an optimized eclipse.ini to ensure good performance (But I have no direct experience using it with Android though).


Pēteris Caune mentions in the comment the following workaround:

  1. Download
    https://android.googlesource.com/platform/frameworks/base/+archive/<branch>.tar.gz,
    where <branch> is one of those listed here (froyo-release for 2.2, the file is about 113MB):
    https://android.googlesource.com/platform/frameworks/base/+refs
  2. Extract the contents of base/ in the tar into "<path-to-android-sdk>/platforms/android-<api-version>/sources" where <api-version> is 8 for froyo, 7 for eclair, etc.
  3. Enjoy fast content assist in 3.6!


I've been using Helios (3.6) with eclim since Oct 2010 for Android development and I occasionally have eclipse freeze when autocompleting. This freeze can also occur in Vim if you use eclim's completion.

While it's irritating, it doesn't happen often. I can't remember the last time it happened, so the last android tools update I did may have fixed it. (I'll have to keep an eye out and try Pēteris Caune's workaround if it strikes again.)


I've been very happy with eclim. I use an eclipse external tool to launch vim and source an eclipse setup file. External Tool arguments:

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

In eclipse, I recommend setting General > Workspace > "Refresh automatically" so that Eclipse builds your changes from vim. Otherwise you constantly get "file out of date with filesystem" messages.

Some of the code loaded in 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>

You can find my vimfiles on github.


I've spent some time trying to get it running with Helios, but to no avail. Better go with Galileo, that one worked immediately.


I've found what for me is a big problem:

Possible bug in Eclipse DDMS emulator control?

I've had to go back to 3.5

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜