the Life of Zim

9th March
written by dzimney

About a week ago I got the Nexus One from Google. Today I decided to delve into the SDK and see if I could get a “Hello, World!” script running on the phone. Following the Android Developers website, I downloaded the SDK and installed the Eclipse plugin for Android. I was able to get the Hello, World! script running fine in the virtual Android machine, but when I started trying to connect my phone for debugging I started running into issues. I’m using the Nexus One which is currently on Android 2.1 and I’m on OS X 10.6 (Snow Leopard). It seemed that whenever I ran the command adb devicesin the terminal, I got an empty list of devices. Frustrating.

Well after scouring the internets with no results, I remembered that when I installed the SDKs with Eclipse, there seemed to be a lack of overlap between the two. When installing the Eclipse Plugin, it creates a folder in the workspace called, except this SDK doesn’t line up with the SDK from the Android Developers site. When I had initially put things together I simply copied over some of the files created by Eclipse to avoid breaking the plugin. But when running adb devices, it was running from the Eclipse provided SDK. Upon trying again with the adb command from the Android Developer’s SDK, the phone shows up on the list of devices. So now I’m copying arranging files to use the good SDK.

Not sure if this will have an effect on the Eclipse plugin. I’m assuming not. My guess is that the Eclipse plugin was simply packaged with an older version of the SDK. We’ll see though. So happy to see the Android SDK is in Java though. Way better than the iPhone SDK.

Looks like you don’t want to overwrite any files. Simply leave the directory as is and point to the downloaded SDK in the Android preferences pane in Eclipse (SDK Location). I had to delete and recreate my helloworld project in Eclipse to repair the errors due to the missing core library (android.jar).

Leave a Reply