15
Oct
image
Last Updated: March 21st, 2010

This post and all its comments were migrated from Artem's personal blog beerpla.net when Android Police launched. If you would like to visit the original post there, please click here.

Today is my first day looking at Android development. My first encounter with the Android plugin for Eclipse has not been very smooth, to say the least. I am not sure if it's Android's or Eclipse's fault but I just wasted 2 hours on errors during the plugin installation and would like to pass on the time savings to you.

The plugin install page provides initial instructions and the location of the plugin to give Eclipse (https://dl-ssl.google.com/android/eclipse/). This is very standard stuff and I've installed many plugins exactly the same way. However, here's when problems started.

Problem #1: Error while loading manipulator

Eclipse just shows a cryptic Install failed box. Here are the highlights:

  • !MESSAGE Error while loading manipulator
  • java.lang.IllegalStateException: !fwConfigLocation.equals(fwPersistentDataLocation)

It looks like for whatever reason, Eclipse's fwConfigLocation variable does not match fwPersistentDataLocation. I have no idea where those come from and searching for a solution (such as this crazy Japanese sourceforge and this Eclipse bug), restarting Eclipse, and beating my head against the wall took the majority of my the 2 hours I spent on this.

Here's the full log, which will help people with the same problem find it in search engines:

!ENTRY org.eclipse.equinox.p2.touchpoint.eclipse 4 0 2009-10-15 13:21:11.224
!MESSAGE Error while loading manipulator.
!STACK 0
java.lang.IllegalStateException: !fwConfigLocation.equals(fwPersistentDataLocation)
	!fwConfigLocation=C:eclipseconfiguration
	,fwPersistentDataLocation=C:eclipsepluginsconfiguration
	at org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxManipulatorImpl.checkConsistencyOfFwConfigLocAndFwPersistentDataLoc(EquinoxManipulatorImpl.java:65)
	at org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxManipulatorImpl.loadWithoutFwPersistentData(EquinoxManipulatorImpl.java:360)
	at org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxManipulatorImpl.load(EquinoxManipulatorImpl.java:331)
	at org.eclipse.equinox.internal.p2.touchpoint.eclipse.LazyManipulator.loadDelegate(LazyManipulator.java:50)
	at org.eclipse.equinox.internal.p2.touchpoint.eclipse.LazyManipulator.getConfigData(LazyManipulator.java:108)
	at org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.UninstallBundleAction.uninstallBundle(UninstallBundleAction.java:74)
	at org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.UninstallBundleAction.execute(UninstallBundleAction.java:29)
	at org.eclipse.equinox.internal.p2.engine.ParameterizedProvisioningAction.execute(ParameterizedProvisioningAction.java:35)
	at org.eclipse.equinox.internal.provisional.p2.engine.Phase.mainPerform(Phase.java:129)
	at org.eclipse.equinox.internal.provisional.p2.engine.Phase.perform(Phase.java:72)
	at org.eclipse.equinox.internal.provisional.p2.engine.PhaseSet.perform(PhaseSet.java:44)
	at org.eclipse.equinox.internal.provisional.p2.engine.Engine.perform(Engine.java:54)
	at org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningUtil.performProvisioningPlan(ProvisioningUtil.java:389)
	at org.eclipse.equinox.internal.provisional.p2.ui.operations.ProfileModificationOperation.doExecute(ProfileModificationOperation.java:61)
	at org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningOperation.execute(ProvisioningOperation.java:37)
	at org.eclipse.equinox.internal.provisional.p2.ui.ProvisioningOperationRunner$1.run(ProvisioningOperationRunner.java:94)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
 
!ENTRY org.eclipse.equinox.p2.engine 4 4 2009-10-15 13:21:11.240
!MESSAGE An error occurred while uninstalling
!SUBENTRY 1 org.eclipse.equinox.p2.engine 4 0 2009-10-15 13:21:11.240
!MESSAGE session context was:(profile=epp.package.php, phase=org.eclipse.equinox.internal.provisional.p2.engine.phases.Uninstall, operand=[R]javax.activation 1.1.0.v200905021805 -->
[R]javax.activation 1.1.0.v200906290531, action=org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.UninstallBundleAction).
!SUBENTRY 1 org.eclipse.equinox.p2.engine 4 0 2009-10-15 13:21:11.240
!MESSAGE Error while loading manipulator.
!STACK 0
java.lang.IllegalStateException: Error while loading manipulator.
	at org.eclipse.equinox.internal.p2.touchpoint.eclipse.LazyManipulator.loadDelegate(LazyManipulator.java:54)
	at org.eclipse.equinox.internal.p2.touchpoint.eclipse.LazyManipulator.getConfigData(LazyManipulator.java:108)
	at org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.UninstallBundleAction.uninstallBundle(UninstallBundleAction.java:74)
	at org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.UninstallBundleAction.execute(UninstallBundleAction.java:29)
	at org.eclipse.equinox.internal.p2.engine.ParameterizedProvisioningAction.execute(ParameterizedProvisioningAction.java:35)
	at org.eclipse.equinox.internal.provisional.p2.engine.Phase.mainPerform(Phase.java:129)
	at org.eclipse.equinox.internal.provisional.p2.engine.Phase.perform(Phase.java:72)
	at org.eclipse.equinox.internal.provisional.p2.engine.PhaseSet.perform(PhaseSet.java:44)
	at org.eclipse.equinox.internal.provisional.p2.engine.Engine.perform(Engine.java:54)
	at org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningUtil.performProvisioningPlan(ProvisioningUtil.java:389)
	at org.eclipse.equinox.internal.provisional.p2.ui.operations.ProfileModificationOperation.doExecute(ProfileModificationOperation.java:61)
	at org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningOperation.execute(ProvisioningOperation.java:37)
	at org.eclipse.equinox.internal.provisional.p2.ui.ProvisioningOperationRunner$1.run(ProvisioningOperationRunner.java:94)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
!SESSION 2009-10-15 13:31:40.853 -----------------------------------------------
eclipse.buildId=I20090611-1540
java.version=1.6.0_16
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Command-line arguments:  -os win32 -ws win32 -arch x86

Finally, I found a solution that worked - modify eclipse.ini (the one that sits in elipse's install directory) and add the following:

-startup
file:/C:/eclipse/plugins/org.eclipse.equinox.launcher_1.0.200.v20090520.jar
--launcher.library
file:/C:/eclipse/plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519

Note that the exact locations may differ for you, so figure out what is installed on your machine and replace accordingly.

Also, it seems that the location of the file HAS to be on a new line - otherwise it is not recognized. What kind of shit is that, Eclipse? Some values in eclipse.ini are specified on the same line separated by space, some separated by '=', and some have to be on a new line? This fun trivia fact wasted about 45 minutes of my time.

And yes, startup has 1 dash and launcher.library has 2. /sigh

Edit: it looks like by default Eclipse does come with these options. I somehow managed to lose them, so this is probably my fault. The error couldn't be more cryptic though.

Problem #2: java.io.IOException: Foo does not exist

java.io.IOException: The file "C:eclipsefeaturescom.android.ide.eclipse.adt_0.9.3.v200909031112-12945" does not exist

Great. Now what…

After examining the features directory, I indeed found that directory com.android.ide.eclipse.adt_0.9.3.v200909031112-12945 does not exist. What I did find though is com.android.ide.eclipse.adt_0.9.3.v200909031112-12945.jar, which is simply an archive. Why didn't you unpack this archive, Eclipse? Or Android plugin devs? Whoever is responsible for this - argh!

After quickly creating the directories and unpacking the .jar contents into them, Eclipse was finally able to install the Android plugin.

If installing a plugin is this friendly, I can only imagine what awaits me in Android app development. Am I the only one with these problems? You let me know.

  • http://dmitrykan.blogspot.com D_K

    To be honest I have experienced similar troubles while installing the Android plugin for Eclipse. What version (if at all it matters for this purpose) of Eclipse you've used?

    Mine is Eclipse Ganymede v. 3.4.0.

    P.S. Android looks very raw to be ready for easy public use by developers. I had a chance to play with toy sample Android applications under Eclipse a couple of months ago, and what now? They decline to launch:

    An internal error occurred during: "Launching NotepadAndroid".
    com.android.ddmlib.AndroidDebugBridge.getDevices()[Lcom/android/ddmlib/Device;

  • http://blog.thomaskjeldsen.dk Thomas Kjeldsen

    I had a similar problem installing the Google App Engine SDK and Google Plugin for Eclipse 3.5, in Eclipse Galileo.

    Adding these four lines to the config file did the trick.

    I'm also wondering how I lost them.

  • http://beerpla.net Artem Russakovskii

    To be fair, I didn't have either of these issues when installing the same plugin on my laptop and another desktop. The machine in the post was slightly clusterfucked, I suppose.

  • http://ianwelles.com Ian

    I installed the plugin with no trouble at all. I had a vanilla eclipse set up, nothing modded there. I grabbed just the latest SDK. Might be worth noting I am on a mac...

  • Tim H.

    I had other issues with the "new" plugin installation, namely it took multiple shots/forever to download the actual SDKs. Also, I have had issues in the past with using the SSL link. I noticed in the Settings there is now a 'force download through HTTP on SSL error' checkbox to automatically use the non-SSL url.

    The error you described sounds like an local machine/Eclipse issue.

    However, it should make you feel better that updating will be quite easy once it's installed :)

  • http://olentz.net Lawrence

    I never had that issue. Same with Tim. H., updating the plugin is really simple now.

  • John

    I've had that problem too, was really annoying.

  • Ghis

    Your post helped... Had the same issue with Eclipse 3.5.1 (with Myeclipse 8 plug-in)
    here's my file

    -vm
    C:/dev/jre/jdk160_05/bin/javaw.exe
    -startup
    plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
    --launcher.library
    plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519
    -showsplash org.eclipse.platform
    --launcher.XXMaxPermSize
    -vmargs
    -Xmx512m
    -XX:MaxPermSize=256m
    -XX:ReservedCodeCacheSize=64m

  • Tom Dube

    I could not install any plugins, I was about to
    re-install eclipse when I found this helpful tip.

    It fixed my eclipse installation, thanks for sharing.

  • http://www.facebook.com/people/Walice-Chela/100001468721343 Walice Chela

    Mobile programming guides 
    http://mob-programming.blogspot.com