Posts Tagged Android SDK

Eclipse :: coding for Android back again

walking android

After a long while, I’ve recently started to code a few things for Android, launched Eclipse and was greeted with mysterious errors. Which include:

  • “layoutlib is too recent. update your tool” in the Eclipse layout editor. This was solved by upgrading android libs and SDK and also upgrading ADT from inside of Eclipse->Help->Upgrade. The former upgrade probably was not really necessary, but I did it anyway just in case to prevent other incompatibilities from coming out.
  • another gem appeared when I tried to create an empty project to test a few ideas: “error generating final archive: Debug certificate expired”. This required deleting ~/.android/debug.keystore and “cleaning” the project, which eventually led to regeneration of required debug keys. Google says debug keys are expired after 365 days, so it must have been more than 1 year since I’ve started playing with Android.
  • if you plan to access internet from the emulator, open Run->Configuration->Target and set “Additional Emulator Command Line Options” to “-dns-server 8.8.8.8,8.8.4.4″ and don’t forget to require INTERNET permission in the manifest.

And yes, I’ve got two walking plastic Androids to race them against each other around my table.

, ,

No Comments

Eclipse IDE configuration for Android development

adt and ddms installation into eclipseThere are a few steps to configure Eclipse for Android development:

  1. install Android SDK, download and unpack archive, then run ‘./android’ from tools/ subdirectory and install all SDK options
  2. also, it might be a good idea to add the path to sdk/tools to your $PATH
  3. start Eclipse, open Help -> “Install new software” and enter URL: https://dl-ssl.google.com/android/eclipse
  4. select all options (ADT and DDMS) and press Next
  5. accept all license agreements until there’s a “Finish” button, press “Finish” and let Eclipse restart itself.

In my case (Eclipse 3.5) there were errors at the step 4, like

Missing requirement: Android Development Tools 0.9.4.v200910220141-17704
(com.android.ide.eclipse.adt.feature.group 0.9.4.v200910220141-17704)
requires ‘org.eclipse.wst.sse.core 0.0.0′ but it could not be found

If you encounter the same errors, try to open Help -> “Install new software” again and add the following URLs:

  • http://download.eclipse.org/releases/galileo
  • http://download.eclipse.org/technology/epp/packages/galileo
  • http://download.eclipse.org/eclipse/updates/3.5

In my case installation went smoothly after I added the first two.

After the Eclipse reloads…

android SDK path optionsit’s necessary to define SDK installation path in preferences. Open Window -> Preferences, and click “Android”. There might be message about SDK path, anyway push “Browse” button and navigate to the SDK installation path. When you press “Apply” all SDK options (Google API and Android versions) should appear in the selection box.

Press OK and you are ready to create Android applications!

,

No Comments