Showing posts with label eclipse. Show all posts
Showing posts with label eclipse. Show all posts

Saturday, 28 December 2013

"Collect preferences failed" eclipse ADT error

Today I updated my Android SDK in eclipse to the last version using the Android SDK Manager.



After the update was over, eclipse console was giving me this error message:

[2013-12-28 10:45:08 - Framework Resource Parser] Collect preferences failed, class java/lang/AutoCloseable not found in C:\Users\<username>\android-sdks\platforms\android-19\android.jar

Well I solved it simply by updatng the ADT eclipse plugin to the last available version.
In eclipse open: Help > Check for updates and let it work, then accept the new software to be installed.

Hope it helps somebody else!

Sunday, 25 August 2013

Configure Assembla GIT repository in eclipse (Windows)

Today I found out that setting up eclipse on a Windows system to connect to an Assembla GIT repo is not really straightforward. I'll try to guide you step-by-step to the environment set up, I take for granted that you have already created your Assembla project and that you've already have your eclipse project in a local GIT repository that you want to push on Assembla.

Key generation

First of all you have to generate a pair of private/public keys. You can do this from inside eclipse going in "Windows>Preferences>General>Network Connections>SSH2". Select the tab "Key Management" and then "Generate RSA Key...".




This will create a pair of public/private keys to be used for SSH. Now, without choosing a passphrase, save the private key on your PC in the directory "C:/Users/<Username>/.ssh" (Unless you have changed eclipse defaults stated in the SSH2 "General" tab). Copy to clipoard the public key string as it is in the text box, you'll need it to configure Assembla.
Select "Apply" and close the dialog with "OK".

Assembla configuration

Open your Assembla profile page and go to the tab "Manage SSH Keys". Here paste the public key you have copied before and add it with the "Add" button.


Now go to your project page and select the "Git" tab, Assembla should give you the repository url. Something like that: git@git.assembla.com:<project-name>.git, copy it in the clipboard, you'll need it to configure eclipse.

Remote repository creation

Return to eclipse and go to the GIT Repository Exploring perspective, select your local GIT repository and right click on the "Remotes", and select "Create Remote...".


Select the remote name and then go on, "origin" is the default. Eclipse will ask you to cofigure the push settings.


Select "Change..." near the URI field. Eclipse will show you a new dialog.


Paste the address you have copied from Assembla in the URI field, select SSH protocol and leave "git" as username. Confirm and close all the dialogs, if you select "Save and Push" your project will automatically be pushed to Assembla, otherwise you can do it later manually.

You should now be able to work with your Assembla GIT repository.
Let me know if this works for you also.

Note: Tested with eclipse Juno and EGit 2.3.1

Monday, 5 August 2013

Eclipse failing during Android "export signed application package"

Sometimes eclipse fails while processing the "export signed application package" for Android. The fail can appear as a generic error message “Conversion to Dalvik format failed error 1” or as a complete crash of the  IDE.

Even restarting eclipse doesn't seem to fix the problem. A simple solution I've found that works for me is this one:

  • Disable automatic project building
  • Clean the project
  • Export the package
  • Re-enable automatic building
This seems to work on both, Mac and Windows version, of eclipse.
Let me know if this works for you also.