Eclipse Android Plugin sluggish - android

I have recently installed the most recent Android Plugin for Eclipse on the most recent Eclipse version. The problem is that the syntax proposals are now very, very slow. I have to switch them off.
To be precise. If I press "." after an Android class instance, it takes several seconds, before the proposals for the methods appear, and I can continue typing. After I type a letter, it takes again seconds before I can continue.
Looks like the program is download something from a very slow server. This problem does not exist with Java core classes, and it did also not exist in the previous version I was using.
Is there anything I can do about that?
Rene

In fact, the slow syntax proposals issue is only for the android classes.
I found this fix that completely resolves my issue.
You just need to put the android source files in the sdk folder.
See the full solution here:
http://envyandroid.com/archives/66/slow-android-autocomplete-eclipse-helios-36
I tested it and it did a miracle on my machine.

I had the pauses on auto-complete too, and there's an existing question about it. For me, the solution was to switch to Eclipse 3.5 instead of 3.6; this is advised on the Android Developers website (though it's not a very prominent message!):
Caution: There are known issues with the ADT plugin running with Eclipse 3.6. Please stay on 3.5 until further notice.
Others have had luck modifying eclipse.ini settings to force Java 1.6 and increase the amount of memory used, though this was for combating general slowness.

I'm not trying to flamebait here, but please do consider the Intellij IDEA for Android development. I switched from Eclipse to IDEA for Android development about a year ago and I'm quite happy.
Intellij IDEA for Android has just been open-sourced.

I saw the keystroke delay happen when I first used eclipse as a result of using the "wrong" JRE to run eclipse (which is itself a java application). Try making sure you are using the JRE that comes with the JDK from Sun, er, Oracle. Unfortunately more nobly motivated alternatives may not work as well.

For best performance and hassle free I would recommend the best combination is :
1) Eclipse (J2EE) 3.5
2) JDK 1.6 Update 20
and remaining all are not worth for setting Android development.

Related

How to develop Android applications? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I used to be an Android developer for 2 years, but over 2 years ago. I believe that things changed - we have Android Studio, Gradle and probably more tools that I'm not aware of right now.
What is the current development stack for creating Android applications? What tools should we used right now?
I used to use eclipse with ant, but as far as I can see, a lot of people are using AS with Gradle, which is, for my first experience, extremely slow.
How to jump back into Android development after some time of not being up to date with development stack?
Eclipse vs Android Studio is a matter of choice. You can get used to it within hours, or you can continue with Eclipse. I am using both tools for different projects.
Android Studio seemed to be more stabile at some points.
Update on Android SDK and third party libraries are more easily handled with Android Studio.
Android Studio has not NDK support yet. You have to compile native codes outside of Android Studio. Edit:(Well, actually it has support but claimed to be deprecated, probably developers are working on a better solution)
Edit2:(It will be soon officially supported with C/C++ debugger)
With Android Studio you can use java7 syntax, but you have to stick with java6 syntax on Eclipse. Edit:(you can now force java8 with a plugin on A.S and I guess java7 is usable on eclipse too) Edit2:(java7 is a must now for both parties, but still java8 syntax can only be used in A.S with a help of plugin)
Google releases example codes compatible with Android Studio saying eclipse versions will be available soon.
Android Studio has better GUI designer.
Android Studio has better refactoring capabilities.
The most important change is SDK itself, actually. Just check if Android Studio is good enough for you and study on SDK.
It depends on your project. For non critical or hobby projects you should definitely start with AS and Gradle right away because this the the future of Android development. Although it is still in 'beta' and it can break some stuff after a new upgrade, it has many new features which make you more productive and happier in development.
If you have a critical project and you don't want to spend your time with checking and fixing things your are not supposed to fix, you should stick back to Eclipse, at least until AS is released.
Independently on whether you use AS or Eclipse, you should already start learning and using Gradle. It works perfectly for both options. If you hesitate you can even keep Ant and Gradle building your project in parallel. They work together and don't overlap.
I have been using Android Studio the last year and I can say that it is a very powerful tool, that I believe, in the next year, will overcome Eclipse.
When AS was still in version 4.+ Alpha, there were some issues (mostly with external libraries .jar) but since beta was released and up until now almost every bug was fixed.
Moreover, AS is better when it comes to indexing and suggestions. You will be surprised by its suggestion system, which helps you save a lot of time when coding.
I still use eclipse for other projects, but I believe for Android Development AS is the tool you should invest in, if not for now, definitely for the future.
We are using both, Android Studio and the good old Eclipse IDE. We noticed, that it basically depends on what you're doing. Android Studio is good enough for developing from now and it will replace Eclipse soon. However, it has some drawbacks where Eclipse is your choice. A small comparison was made by Google themselves: https://developer.android.com/sdk/installing/studio.html
Eclipse: Eclipse is very stable and works perfectly with ant driven builds. However, if you want to use gradle, there's some work to do to get the build process working with eclipse. We tried to use Eclipse with Gradle but the Gradle Plugin was quite buggy at this time. If you want to use native C code, you must use Eclipse, as Android Studio does not support that, yet.
Android Studio: Looks great and does also a very good job. The gradle integration works much better there. This is a big advantage over Eclipse when you have to deal with many dependencies. This is probably not an issue for small projects. But, if you're developing projects with additional libraries or frameworks you should definitely give Gradle a try. I hope, that the NDK support is coming soon, so that we can switch to AS completely. Ant builds are someway out-dated.
First of all, I will not debate about Android Studio vs Eclipse as it's an opinion based discussion and a kind of a troll...
The Android development basically the same : the base tools still ADB, Android SDK, Java language... So you can continue to use a "notepad" and compile, build and deploy by the SDK tools.
However, like in every development project, you could choose your upper level tools. Your question is about IDE and building system. This is only a matter of choice.
Android Studio and Gradle are still in beta phase for Android developments and you could use them only if you keep this in mind. You could continue to use Eclipse and Maven or switch to Android Studio and Gradle or keep using Eclipse but moving from Maven to Gradle... just make what you prefer.
The Android development stack evolved this way :
Basics tools : Text editor, SDK tools
First IDE : Eclipse with ADT plugin (can run your program from an IDE)
Industrialisation phase : Eclipse ADT + Maven (dependencies management, building process management...)
Coming phase : Android Studio (IntelliJ based) + Gradle (you can compare Gradle to Maven, but this is another discussion)
I think that other answers will give you personnal points of view about Eclipse vs Android Studio, Maven vs Gradle, etc... which is a really personnal choice ;)
My development stack for Android :
IntelliJ 14
Maven
Android SDK
plus my own OSS Framework to ease the pain of Android for a Java EE developer
Reasons:
IntelliJ is the best available IDE imo
Maven is pretty mature
The plugin has become useable
The workspace integration Maven -> IntelliJ is working great (both, using maven builds and deriving IDE builds from maven)
If Android Studio (which is in great parts IntelliJ) has become slow, it come due to the gradle stuff. I had a large scale project based on gradle and made these experiences :
Slow, Slower, gradle (up to 2GB memor consumption for building an app)
Xml is horrible, but gradle dsl is imo even worse
Switching to gradle 2.1 broke the predicate logic (e.g. formerly working project.hasProperty("foo") && property.ext.foo.equals("bar") does not work any more, this must not happen during a MINOR release
Compared with maven's xml hell, gradle leaves a callow, unmature impression on me, especially building with gradle is hell of a slow job compared with maven.
But - and this is my true oppionion - if gradle is pushed by google and gradleware, it definitely has the potential to become the next generation building tool, although I doubt that the flexibility in gradle will ever lead to a proper IDE workspace build derivation. From my point of view, the choice for gradle over maven done by google happened in a too early state.
just my two cents.
PS: Try tuning the memory settings. Give more memory to IDEA (e.g. 2GB in a 64bit enviroment). My experience with IntelliJ is, that the default mem settings are too small. You can find it in $InstallDir/bin/idea.exe.vmoptions resp. $InstallDir/bin/idea64.exe.vmoptions
EDIT: This is not intended to be gradle bashing. Gradle has large potentials indeed. This post reflects my experiences during my last project basing on gradle (non-Android). For beginners gradle might be the better choice since it is a lot easier than maven.

Getting LibGDX to work in Eclipse

So I've been trying to install libgdx for a few days with Eclipse and it kept telling me various things (Android ADT, Java JDK, etc.) needed to be updated, so I did that, but I kept getting the same error.
Then I decided to download an older version (0.9.8) and I used the gdx-setup-ui.jar to set up my projects. But upon opening them in the Eclipse/ADT bundle, the Android and HTML projects had errors in them involving the import statements, which I tried to solve to no avail.
This is the tutorial I've mainly tried to follow.
Does anybody have a solution for me to get it to work? I'm most familiar with Eclipse, having worked with it for Android for a while now, so I'd prefer not to switch IDEs.
Thanks in Advance
Use ADT (Android Developer Tools) instead of Eclipse. (Is the same thing anyways)
http://developer.android.com/tools/index.html
If you got errors after importing your projects on android, right click on the android project, and at android, check the version that is there.
For HTML you need to install the GWT plugin.
Recently libGDX has moved to Gradle, so you might want to look over that
https://github.com/libgdx/libgdx/wiki/Project-Setup-Gradle

What are the differences between android studio and the eclipse version bundled with android SDK

I don't have experience in android development and I'd like to start writing an application.
The official developer tools page contains link to two different IDEs. The first contains a bundled ADT version of Eclipse.
Android Studio, the second IDE, is based on IntelliJ.
Apart from these differences I can't get if there is anything that I can do with only one of them (I guess the answer to this question is no) and what's the point of having two distinct official IDEs.
What are the differences between the two?
The first contains a bundled ADT version of Eclipse.
This is simply a packaging convenience. You are welcome to obtain Eclipse separately and add Android tooling to it.
Android Studio, the second IDE, is based on IntelliJ.
At the present time, this is an early-access preview. IMHO, it is not suited for someone who does not have experience in Android application development.
Apart from these differences I can't get if there is anything that I can do with only one of them
At the present time, Android Studio is an early-access preview, meaning that there are lots of things that it does not have integrated in. Now, by this time next year, and hopefully far sooner, Android Studio will have equivalent or superior integration than does Eclipse with the ADT plugin.
and what's the point of having two distinct official IDEs.
There are an infinite number of "official" tools. You are welcome to use a plain text editor and tools outside of any IDE, for example.
You are welcome to watch the Google I|O 2013 video on developer tools, where they describe a bit of the rationale behind the development of Android Studio.
Android Studio vs Eclipse – Main Differences:
Build Tools
Android Studio utilizes the fast growing Gradle build system. It
builds on top of the concepts of Apache Ant and Apache Maven but it
also introduces a Groovy DSL (Domain-Specific Language) that allows
for scripted builds which opens up many automation possibilities like
uploading your beta .apk to TestFlight for testing. Eclipse on the
other hand uses Apache Ant as its main build system which a very
robust XML based build system that many Java developers may already be
familiar with.
Advanced Code Completion/Refactoring
Both IDEs feature the standard Java code auto completion but in the
case of Android Studio, Google has baked in deeper support for
specific Android code and refactoring. Android Studio can refactor
your code in places where it’s just not possible using Eclipse and
ADT. In addition, in my opinion IntelliJ’s Java auto completion seems
more “intelligent” and predicts better what I want to do so there is
definitely an improvement in this area over Eclipse.
User Interface Design
One of the main selling point Google used to market Android Studio
when it came out was its completely redesigned user interface design
tool. After working with it for some time, it’s clear that the new
tool is much better than the old. It literally crashes it. The new
interface design too in Android Studio is faster, responds to changes
more rapidly and has more customization options that with Eclipse, you
had to manually set in the XML.
Project Organization
Both IDEs work differently in an effort to help you manage and
organize your projects. If you’ve used Eclipse then you must be
familiar with the concept of workspaces. When Eclipse starts, you
select the workspace that contains your projects and you can load all
project of that workspace in your tree navigation. If you want to
switch to a project in a different workspace, then you have to restart
the whole IDE. Android Studio treats this situation differently by
introducing the concept of modules. Your app could be one module, a
library that you just downloaded can be another and the Ad SDK you are
currently integrating could be a third. Each of these modules can have
their own Gradle build files and declare their own dependencies. To
me, Android Studio seems more natural but it takes some time to get
used to if you have been using Eclipse for a long time.
IDE Performance/Stability
Eclipse is a purely Java based software, and a big one. In order to
run it reliably you need to have more than decent amount of RAM and
good CPU power to back it up. Many user who do not strictly meet these
criteria are reporting very bad experiences with it. It is not unusual
for Eclipse to crash while exporting an apk or having to restart it
after using it for a few hours straight. Having said that, Android
Studio is still in beta so it comes with its own bugs that crash the
IDE every now and then but in the meanwhile, the whole experience
feels faster and more robust.
Conclusion
Having used both Android Studio and Eclipse for a while now, I would
personally say that Android Studio has the edge over the two. It might
be a bit unstable yet and some updates require a complete
re-installation of the software but when it eventually comes out of
beta, it will blow Eclipse with ADT out of the water. I especially
like the stability of the editor and not having to reboot every now
and then, the new and improved UI designer and the sexy themes that
make Android Studio a real eye candy. What side will you take in the
Android Studio vs Eclipse battle?
Besides the numerous points already made, while you can use the ADT tool for other projects outside Android, the Android Studio is purely dedicated to the development of Android apps.Android Studio also allows you to work faster as it gives you intelligent suggestions as you type, freeing you from the shackles of having to go back to your .java or .xml files to look up names of variable or other stuff you can't remember.I just started using Android Studio myself and i can say i am never leaving it.It is particularly good for new programmers.

For android development, should I upgrade to Eclipse v4 ?

I'm using Eclipse v 3.7.2 to develop Android apps. I've been at it a few months and making some decent headway and am not sure I want to rebuild my development environment.
I don't doubt that Eclipse has been improved, but has it been improved for android development?
Before I rebuild my environment I'd like to know why should I fix it.
Can any one tell me if they have found any major feature advantages to upgrading to version 4 of eclipse?
I tried posting in the android enthusiasts group to find the question was "off topic", as there are many developers here I hope ye don't mind a non coding related question.
There is absolutely no need to rebuild anything. From your 3.7.2 installation you should be able to update your installation to 3.8 in place. Use Help->Check for updates with the 3.8 specific update site: http://download.eclipse.org/eclipse/updates/3.8
That way you get all the bug fixes and changes of the last release cycle, but do not need to switch to the e4 version of Juno. For you as Eclipse user the changes in the modeled workbench and CCS styling are not really important.
Note: Updating in place might be a problem if you use Linux and have installed Eclipse via a repository manager.

Android + Eclipse 4.1

I installed the android plugin for eclipse, on eclipse 4.1. Everything works except the DDMS perspective.
Any of you guys know a solution?
You should use Eclipse 3.7. Eclipse 4.* is a work in progress and shouldn't be used in production environments yet.
Seems to be fixed in 4.2
http://code.google.com/p/android/issues/detail?id=19105
While I agree with Chris that 3.7 is the stable environment to use, there's not really anything wrong with using an unstable development environment if you're willing to accept the risks that go along with it (generally I would think that issues would mostly be limited to design-time and not run-time). If the only thing that is missing is the DDMS perspective, you could consider simply running DDMS directly instead of inside Eclipse.

Categories

Resources