Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 767
James Avatar asked Sep 17 '10 06:09

James


People also ask

Is Eclipse good for Android development?

Android Studio is specifically designed to build Android applications but Eclipse is useful for building android as well as other web and desktop applications.

Which version is best for Eclipse?

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.

Can I use Eclipse in mobile?

Eclipse Mobile may be used on either Apple or Android smart phones or tablets.


2 Answers

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!
like image 55
VonC Avatar answered Oct 14 '22 18:10

VonC


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.

like image 31
idbrii Avatar answered Oct 14 '22 18:10

idbrii