What version of eclipse is safe for development for android?
Asked Answered
G

4

6

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 for android development? I'd appreciate any help.

Guardhouse answered 17/9, 2010 at 6:34 Comment(0)
F
3

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!
Formicary answered 17/9, 2010 at 6:59 Comment(2)
Slow code assist in 3.6 is indeed a nagging problem, but there's a workaround: code.google.com/p/android/issues/…Supen
@Pēteris: thank you for the link. I have included the workaround in my answer.Formicary
I
1

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.

Iormina answered 16/4, 2011 at 19:31 Comment(0)
O
0

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

Oryx answered 17/9, 2010 at 7:2 Comment(0)
O
0

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

Orren answered 18/9, 2010 at 7:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.