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.
Android Studio is specifically designed to build Android applications but Eclipse is useful for building android as well as other web and desktop applications.
Eclipse 4.23 (2022-03) It is the supported release. A Java 11 or newer JRE/JDK is required, LTS release are preferred to run all Eclipse 2022-03 packages based on Eclipse 4.23, with certain packages choosing to provide one by default. The Installer now also includes a JRE--consider using the Installer.
Eclipse Mobile may be used on either Apple or Android smart phones or tablets.
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:
https://android.googlesource.com/platform/frameworks/base/+archive/<branch>.tar.gz
,<branch>
is one of those listed here (froyo-release
for 2.2, the file is about 113MB):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.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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With