Developing Android apps on ChromeOS

Posted: June 4, 2018 in Uncategorized

Having been at Google IO 2018 I happened to be lucky enough to attend the “What’s new on ChromeOS.” session at the end of which they handed out not only groovy socks but also 75% off on Pixelbook.

During the session however Google had all sorts of things to say about enabling both Linux and Android development on ChromeOS. Now these are two things the world has needed and wanted for some time.

The Chromebook offer is for the midrange i5 based Chromebook. I received mine on Friday so I’ve had a few days with it.

IMG_6336

Setting up to Android development, meaning having Android Studio running as well as being able to run/debug Android Apps running on the Chromebook wasn’t too hard to setup.

Instructions are here but they are wrong in a few spots.

First, do turn on developer unstable and turn on Linux. BUT in order to debug Android Apps via Android Studio, you need to then turn on developer mode on your Pixelbook (or other akin device). You can’t debug Android Apps over USB (yet) so really I view this as an essential step.

Developer mode of course wipes the device so yeah, takes a bit longer to get to the end goal. You’ll live. I’ll link to the ‘snarky’ guide because there’s reasons not to enable developer mode if you don’t know what you’re doing. Remember you JUST need to enable developer mode, nothing else from this guide.

With developer mode on, again, turn on Linux mode, and now follow the rest of the guide. When you get to the point where you need to Mount Linux Files, before you do that you need to enable ssh server first in the debian environment.

> sudo rm sshd_not_to_be_run

> sudo service ssh restart

Ok now go back to the guide.

Then when you get to the Android Studio part, make sure you download the current preview, 3.2. If you don’t you’ll end up in a world of frustration where your new shiny Pixelbook will be at great risk to you throwing it across the room.

That done, you’ll find App development is pretty darn smooth. I’ve pounded out a couple of simple apps this weekend and everything ‘just worked’.  I’ll note that your very first compile will take awhile. This is down to some gradle files getting downloaded in the background. In real world terms, my first “hello world” app took about 3 minutes to build. After that, more like a second or two.

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s