Develop Native Android Apps on Your Chromebook

If you were fortunate enough to receive a Chromebook Pixel at last year’s Google I/O (or picked one up on the after-market), your glee was likely replaced by frustration as you tried to use it as a dev machine. Enter Crouton, a solution that allows you to run Ubuntu Linux within your Google Chrome environment, no reboot necessary.

When I wrote a blog post about sending email within a native Android application, I decided to give Crouton a spin and find out if it was possible to do Android native development on a Chromebook Pixel. I came across a few stumbling blocks during that process, but I was ultimately successful. My goal with this post is to get you developing native Android applications on your Chromebook within one pomodoro.

I’ve only tested this tutorial on a Chromebook Pixel, so if you can get it working on another flavored Chromebook, please share in the comments.

Install Crouton with Ubuntu

To get started, I used the Lifehacker tutorial on how to install Linux on a Chromebook. Under step two, bullet four, I used the following command:

sudo sh -e ~/Downloads/crouton -t chrome, touch, unity -r saucy

I did try the Xfce environment out first, but I did not enjoy the experience, ymmv. If you decide to go the Unity route, run the following command to start up your new environment:

sudo startunity

Next, fix the screen resolution by adding this line to the end of the /etc/X11/xinit/xserverrc file:

-dpi 239

Install the Eclipse/Android Development Tools and Java

Next, let us get your Android development environment running. This tutorial is what I used for that achievement, following are a few gotcha’s that were not in the tutorial:

Author: Elmer Thomas

Elmer Thomas is SendGrid's Hacker in Residence. His mission is to help SendGrid live up to its slogan: "Email Delivery. Simplified" by improving the lives of developers, both internally and externally. Via all sorts of hackery, of course. Follow his exploits on Twitter and GitHub.