Am I the only Eclipse developer whose workbench quickly sputters, wheezes, crashes or hangs and makes me use Windows 7 Task Manager to hard-bounce it?
I've got dedicated, Android-only (as it were) installations of Eclipse Helios (3.6) and Galileo (3.5) with the very latest Android SDK (0.9.7.v201005071157-36220) using android-sdk_r06-windows.zip. I'm running Windows 7 Professional 64-bit, but 32-bit Eclipse (Helios and Galileo) and a 32-bit jdk1.6.0_20.
It is true that these are both Eclipse Java EE installations and not the bare-bones Java-only (non-WTP) versions. I haven't tried that yet. I followed a tutorial that said to use Helios, but said nothing about what not to include (like WTP which I ordinarily use in my work).
I can avoid much of the trouble by editing XML files using the standard Eclipse XML Editor and avoiding the Android SDK's various XML editors, but very quickly, things stop working and the whole thing caves in on itself.
I've tried bumping memory in eclipse.ini, -Xms128m, but that hasn't helped.
I'm looking to hear from someone who's gotten over this mess or who knows what I should have done.
Any ideas?
Thanks in advance for any and all comments.
Russ Bateman
After a week of frustration I reached the conclusion that you cannot install Android for use in Eclipse Java EE, my usual mode. Instead, use the plain Java Eclipse. My definitive installation became Eclipse Galileo SR2 IDE for Java Developers. I added these lines to eclipse.ini, though I probably did not have to be so generous:
-vmargs
-Xms256m
-Xmx1024m
-XX:PermSize=128m
-XX:MaxPermSize=512m
In order to distinguish this version of Eclipse from my usual Java EE development version on my task bar, I found an icon to graft onto it at http://www.large-icons.com/stock-icons/free-large-android-icons.htm and selected one that looked most like the green Android icon.
Add this line -XX:MaxPermSize=256m to your eclipse.ini file right after -vmargs. I have no idea why, but apparently it's a known bug. I can get you the source where I found this solution if you'd like, it took me a fair bit of googling
Related
I have an Android project I'm developing using ABS 4.2 - the development box is running Mint 12 32bit with jdk 1.7.0_03 installed, using Eclipse Indigo.
I recently updated my laptop and installed Mint 13 64bit, jdk 1.7.0_07 and Eclipse Juno.
I pulled the workspace across from the desktop (via SVN) and have wasted about two days trying to build ABS (not even my own project yet!) to no avail. I keep getting a heap of errors (always 85), starting with a load of...
Cannot cast from Activity to SherlockFragmentActivity SherlockDialogFragment.java /library/src/com/actionbarsherlock/app line 27 Java Problem
I've checked the java and javac settings on both boxes - they both resolve to the Oracle installed software.
I've checked the project properties, both machines target 4.0.3 API 15 and the compiler compliance levels are both 1.6 - I'm really at a loss what else could be wrong, it all works fine on the desktop, just not on the laptop.
Could anyone please suggest what else I can try to resolve this? I really have run out of ideas.
Well, it would appear that SVN doesn't carry everything across from one machine to the other, though I still have to identify what wasn't (and include it so I have a full valid code base in SVN!).
I tried Indigo and it made no difference, exactly the same result, I also double-checked the libraries and they all seemed good. So I then decided to copy across everything I could, direct from one machine to the other, rather than using SVN (though didn't copy the sdks). Lo and behold... it worked!
I've preserved all the previous directories that I've now copied so will run a diff and see if I can identify what is different in either the workspace or elsewhere. I'll let you know if I manage to identify the culprit.
Many thanks for both your suggestions, between them they were enough to redirect my thoughts to a slightly different approach, which paid off.
Convivial Latest Arbitrary Chronometric Measurement Period to you both.
I had a working Eclipse setup with 3.6.2 and SDK tools from version 11, and it has been building my main project just fine for quite a while.
For a different project, I thought I needed to upgrade my SDK to the latest and greatest - at this point API 14 (ICS 4.0).
I cannot even reconstruct the steps I went through, but what happened was that my project would seem to build, but I would see that it would say that it was skipping a post-compiler step, and at the end I would have no APK.
I also noticed that it updated my .classpath so that the output path was bin/classes instead of .bin.
Along the way I tried updating my Eclipse to the latest version (Indigo 3.7.1) but this didn't help.
I solved the problem eventually with help from this post on the Google Android forum:
http://code.google.com/p/android/issues/detail?id=21031
For me personally the biggest issue seemed to be solved as follows (qutoe from comment 25 in the forum post)
"I seem to solve the problem with .apk files not being built automatically until run/debug is used (comments #10, #11 etc.). Go to Windows -> Preferences -> Android -> Build and uncheck "Skip packaging and dexing until export or launch" then restart Eclipse. Works for me."
But there is other useful material there. Different people with different projects seem to have different problems with this setup.
I still don't understand the change in the classpath, but it doesn't seem to matter.
In addition, I found a discussion of installing the ADT with Eclipse Indigo which was helpful here in Stackoverflow:
Eclipse Indigo - Cannot install Android ADT Plugin
I also found that I guess because of various uninstalls/reinstalls, for some reason it stopped excluding my .svn directories from the sources. This Stackoverflow post was helpful with that:
Why is eclipse trying to copy my .svn folders from src to bin, and how can I make it stop?
Finally: a tip for really and truly uninstalling Eclipse - everybody says there is no uninstall, and there isn't, but there is a directory that Eclipse leaves in your home directory (in windows 7 under c:\users\) called .eclipse -
Zap it if you really want to start fresh.
In addition, for less extreme measures, there is Project->Clean inside Eclipse, and you can invoke eclipse with "eclipse -clean" for additional cleansing effects. No idea what, but various helpful people along the way suggested trying that to solve problems.
Ah yes - when I first installed Indigo and tried to build, I got a warning that my Java Compiler Compliance level was not up to snuff, which was simply not true - I have only Java 1.6 installed on my machine.
See this post for somebody who had similar experience:
http://marakana.com/forums/android/general/374.html
For me, what worked was simply going to Project, Properties, Java Compiler, then click on Configure Workspace Settings, and click on Ok in the dialog. Didn't need to actually change anything. Just showed it that everything was ok!
Eventually I indeed did clean out my Eclipse and Android installations (including the aforementioned .eclipse directory, and there's also an .android directory in your home directory which you may want to erase if uninstalling the Android SDK Tools doesn't do that - this actually is uninstallable). Installed everything from scratch and then used the additional information provided above and now it's building my APK.
I hope this saves somebody the hours I spent getting my build back in shape.
I recently installed a fresh copy of Motodev. When I type the name of object and a period after it a popup comes up with a list of all of the methods available to that object. Ever since I started using this new copy of Motodev if I have an object with a very large amount of available methods this process freezes the whole program for several seconds.
RelativeLayout and EditText are the two that I have personally noticed that this is a problem with, but I suspect any object that has a large number of methods will cause this. It was never a problem before. Has anyone else seen this issue and if so how did you fix it? I do like having the list pop up so that I can see all of the methods available to me so I'd like to leave that feature turned on if at all possible.
Looks like you figured this out already, but I'll say it for future readers. There is an update to MOTODEV Studio specifically to work with ADT 8.0.1. There were some API changes in ADT that required us to update Studio also. ADT 8.0.1 requires Studio 2.0.1, which is based on Eclipse Helios. There are installers on the MOTODEV site as well as an updater for Eclipse.
Because of the complexity of dependencies with all the Eclipse plugins, I suggest to download the .zip archive at MOTODEV rather than using the "Install Updates" method. I find that I get timeouts quite often at home on broadband that don't happen at work with a bigger pipe.
Also, Studio 2.1 will be available some time within the next week (~Jan 25) and will work with the 2.3 SDK and ADT 8.0.1.
UPDATE: 2/14/11 - It would appear that the correct answer is found at comment #8 in this link: http://code.google.com/p/android/issues/detail?id=7850
Tim will need to formally accept this answer at some point...
Which is as follows:
For those of you with this problem, here's what you can do until the fix is publicly available:
1. Download https://android.googlesource.com/platform/frameworks/base/+archive/<branch>.tar.gz where 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 "/platforms/android-/sources" where is 8 for froyo, 7 for eclair, etc.
3. Enjoy fast content assist in 3.6!
If you are using eclipse v3.6 (Helios) this is a known issue with ADT - the android dev site recommends using v3.5 or v3.4 of eclipse until the problem is resolved.
EDIT: It might be dependent on the version of ADT you are using - I can't find the recommendation to use v3.4 or v3.5 anymore. Perhaps things were fixed with ADT 8.0.x Check which versions you are using anyway.
Im running eclipse on my windows 7 machine, 64bit with 6gb ram and core 2 duo.
Im currently running Eclipse 3.6 and android 2.2 SDK
Im running jdk 1.6
Im noticing that when coding and the context popups to list methods of a class, it hangs Eclipse for up to 15 seconds. This is very frustrating.
One thing to note, when Eclipse hangs, my processor is maxed out, and is being worked by a java process. So its doing something whatever it is. But frequently everytime I finish an object with a period and the context box pops up, its becoming too painful to work with.
I changed some settings in the Eclipse.ini file such as:
-Xms1024m
-Xmx1024m
--launcher.XXMaxPermSize 512m
Is there anything else I should look at:
After a google search
I have been able to find the bug report from Eclipse.
In short:
It is a problem that arises when using Helios with ADT. As the ADT page on android.com says:
Caution: There are known issues with the ADT plugin running with Eclipse 3.6. Please stay on 3.5 until further notice.
To fix it, you will have to use Eclipse 3.5 and put your project in a newly created workspace. (If you keep the workspace from Eclipse 3.6, the problem will occur even on Eclipse 3.5.)
A Work-around procedure is presented in comment#8 at this URL: http://code.google.com/p/android/issues/detail?id=7850
Example:
I'm coding against Froyo, and my target SdkVersion is 7 (AndroidManifest.xml). So for step 1, I downloaded this file:
https://android.googlesource.com/platform/frameworks/base/+archive/froyo-release.tar.gz
And then for step 2, I extracted the base/ directory of that .tgz file into my SDK path, which I install under /opt/android-sdk-linux_x86/. So here's the command I executed against the tgz to put everything where it goes:
tar -vzxf base-froyo.tar.gz -C /opt/android-sdk-linux_x86/platforms/android-7/sources/ base/
The end goal appears to be to place the actual sources into the "sources" folder in the SDK tree, so that when the auto-correct goes out looking for them, they are there.
snpe60 describes it more clearly:
Comment 7 by snpe60, Oct 14, 2010
This issue is happen because the ADT
classpath container have an invalid
source attachment by default. It is
fixed in
https://review.source.android.com/16569.
This change enables changing the ADT
clasppath container's source
attachment and disables setting
invalid source attachment. Hoping it
will be available in ADT 8.0.0.
This is much better Eclipse autocompletion problem
here is a link for the problem you are having
http://aaarkonusurum.blogspot.com/2011/08/eclipse-intelisensein-cldrtan-yavaslgna.html
I'm new to Android & Eclipse. I've downloaded Eclipse and the Android ADT and created an ultra-simple Hello World app (has only auto-generated .java and .xml files).
Eclipse CRASHES (closes after a very brief pause) when I do the following:
In Package Explorer, select AppName/res/layout/main.xml
Press , or double-click, or 'Open With' then 'Android Layout Editor'
(The app runs OK in the Android emulator)
My configuration is:
Android Development Tools 0.9.5.v200911191123-20404 com.android.ide.eclipse.adt.feature.group
Eclipse IDE for Java Developers 1.2.2.20100216-1730 epp.package.java
Windows XP
Can someone tell me what I'm doing wrong or what's wrong with my configuration?
Any suggestions on what to check? For any non-trivial app development I need to
be able to use the Layout Editor.
More ... I can select main.xml and Right-Click and 'Open With' any of: XML Editor,
XML Schema Editor, Text Editor -- with no problem. The problem is limited to Android Layout Editor.
THANKS!
I found the problem.
I discovered the .log files (under \Android SDK\eclipse-java-galileo ...\eclipse )
These files are apparently created by Eclipse when a fatal exception occurs. Upon examining the latest file I saw
# An unexpected error has been detected by HotSpot Virtual Machine:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d2521e1, pid=9156, tid=13952
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0_02-b09 mixed mode)
# Problematic frame:
# C [fontmanager.dll+0x121e1]
and when I looked further, found the folder where fontmanager.dll resides.
Deducing that 'fontmanager.dll' was part of the Java runtime, I saw that I'd been using jre1.5.0_02, and, upon checking the Sun site, discovered that it's an outdated file. So I downloaded (from Sun site) and installed the latest version of the Java runtime.
That fixed it! The Android Layout Editor runs without problems.
THANKS to Nathan for his efforts. As it turned out, his suggestion didn't solve this particular problem, but the info he provided will no doubt be useful.
You have to upgrade your jdk version to the latest version. I found most of the cases online is that the jdk5 made the eclipse crashed and they worked out by upgrade to jdk6. I used jdk6 but the problem existed! At last I download the latest version(jdk7) and the eclipse not crashes any more!
DONT do anything in eclipse while it says "building project" at the bottom right it does this when you load eclipse, and when you run, or add new files.
If you still have the problem, then I cant help you
In case the above answers don't help, this was my resolve:
I had a similar problem where every time I would view the layout editor (even though I was able to see the XML file) Eclipse would crash. I reinstalled Java, updated Java, and I even reinstalled Eclipse with no avail. It turns out that it was a corrupt video driver, nvd3dum.dll. The filename is in the error list.