O'Reilly logo

Mastering Android Studio 3 by Kyle Mew

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a Things project

The APIs used by Android Things are not included in the standard SDK, and so a support library is required. At the very least, you will need the following dependency:

dependencies { ... provided 'com.google.android.things:androidthings:0.5-devpreview'}

Along with this entry in your manifest:

<application ...> <uses-library android:name="com.google.android.things"/> ...</application>

Most Things projects will need more than this, depending on which peripherals are used and whether the project will be tested using Firebase. Taking a look at the provided samples is a good way to see what dependencies are needed; the following snippet is taken from the Things Doorbell sample:

dependencies { provided 'com.google.android.things:androidthings:0.4-devpreview' ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required