Considering that Android Things derives from Android, the development process and the app structure are the as same we use in a common Android app. For this reason, the development tool to use for Android Things is Android Studio. If you have already used Android Studio in the past, reading this section will help you to discover the main differences between an Android Things app and an Android app. Otherwise, if you are new to Android development, this section will guide you step by step to create your first Android Things app.
Android Studio is the official development environment to develop Android Things apps, therefore, before starting, it is necessary you have installed it. If not, go to https://developer.android.com/studio/index.html, to download and install it. The development environment must adhere to these prerequisites:
- SDK tools version 24 or higher
- Update the SDK with Android 7 (API level 24)
- Android Studio 2.2 or higher
If your environment does not meet the previous conditions, you have to update your Android Studio using the Update manager.
Now there are two alternatives to starting a new project:
- Clone a template project from GitHub and import it into Android Studio
- Create a new Android project in Android Studio
To better understand the main differences between Android and Android Things you should follow option number 2, at least the first time.
This is the fastest path because with a few steps you are ready to develop an Android Things app:
git clone https://github.com/androidthings/new-project-template.git
- Now you have to import the cloned project into Android Studio.
This step is longer in respect to the previous option, but it is useful to know the main differences between these two worlds:
- Create a new Android project. Do not forget to set the M
inimum SDK
to levelAPI 24
:

- By now, you should create a project with empty activity. Confirm and create the new project.
There are some steps you have to follow before your Android app project turns into an Android Things app project:
- Open the
Gradle
scripts folder and modifybuild.gradle
(app-level) and replace the dependency directive with the following lines:
dependencies { provided 'com.google.android.things:androidthings: 0.2-devpreview' }
- Open the
res
folder and remove all the files under it exceptstrings.xml
. - Open
Manifest.xml
and remove theandroid:theme
attribute in the application tag. - In
Manifest.xml
add the following line inside the application tag:
<uses-library android:name="com.google.android.things"/>
- In the
layout
folder, open all the layout files created automatically and remove the references to values. - In the activity created by default (
MainActivity.java
) remove this line:
import android.support.v7.app.AppCompatActivity;
- Replace
AppCompatActivity
withActivity
. - Under the folder
java
remove all the folders except the one with your package name.
That's all. You have now transformed an Android app project into an Android Things app project. Compiling the code you will have no errors. In future, you can simply clone the repository holding the project template and start coding.