Posts Tagged Eclipse
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 126.96.36.199,188.8.131.52″ 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.
- install Android SDK, download and unpack archive, then run ‘./android’ from tools/ subdirectory and install all SDK options
- also, it might be a good idea to add the path to sdk/tools to your $PATH
- start Eclipse, open Help -> “Install new software” and enter URL: https://dl-ssl.google.com/android/eclipse
- select all options (ADT and DDMS) and press Next
- 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
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:
In my case installation went smoothly after I added the first two.
After the Eclipse reloads…
it’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!