This is an Android Studio development environment created for Google's Project Tango using Docker. I built this as a fast way to spin-up a Project Tango development environment for myself, but I am happy to integrate suggestions and improvements.
It was made to run on an Ubuntu 14.04 host, but should work under other versions of Linux and OSX (using XQuartz & Docker-Machine) without too much tweaking. I haven't used Windows much for Docker, so I can't really say how well it will work.
Note: You must have a Project Tango device to use this Docker Image. Google has not yet made a Project Tango emulator to use for development.
- Make sure you have Git, Docker, and Docker-Compose installed on your machine.
- Clone this repo:
git clone git@github.com:toddsampson/project-tango-docker.git && cd project-tango-docker
- IMPORTANT: If your host computer user and group IDs aren't set to 1000, update the
android-studio/Dockerfile
to the correct values and use thebuild
command instead ofimage
in the docker-compose.yml. - Run
xhost +
to allow the container to communicate with your host system's X server. - If you don't have an
AndroidStudioProjects
folder on your host computer, create one. Then update/home/toddsampson/AndroidStudioProjects
in docker-compose.yml with the path to your project folder; leaving everything after the ":" unchanged. - Plug-in and turn-on your Project Tango device.
- Run
docker-compose run android-studio
which will setup the Docker Container and launch a Bash terminal. - Run
studio.sh
to start Android Studio. Unless you need specific customizations, simply clickNext
a few times to begin installation of the SDK. - During the SDK install the Project Tango device should show an
Allow USB debugging
alert. When it does, check theAlways allow from this computer
box and clickOK.
- Wait for the SDK to finish installing and click
Finish
to complete setup.
Once Android Studio has been setup, you can run through the Project Tango examples found in the Docker Container's /srv
directory. We will walk through the /srv/tango-examples-c/hello-tango-jni-example
as a quick getting-started.
- From the Android Studio launch screen select
Import Project (Eclipse, ADT, Gradle, etc.)
- Select the
/srv/tango-examples-c/hello-tango-jni-example
folder and clickOK
- You will likely get a number of messages about missing SDKs, built tools and plugins from Gradle. Each time, click the
Install missing platform/build tools and sync project
orFix plugin version and sync project
followed byFinish.
After Gradle stops showing you these messages, usually three screens, proceed to the next step. - Click on the word
Project
printed vertically on the left side of Android Studio. - In the file window that appeared when clicking Project, double-click on
Gradle Scripts.
Then double-click onlocal.properties.
- In the local.properties file, add
ndk.dir=/home/android/Android/android-ndk-r10e
below thesdk.dir=...
line and save the file. This will allow Gradle to know where to find the Android NDK. - Press the green play button (Run App) in Android Studio. Select
Google Project Tango Tablet Development Kit...
under Choose a running device, checkUse same device for future launches
and clickOK.
- The app should launch on your Project Tango device. If you receive a message to enable Motion Tracking, accept it. If not, press the home button on your Project Tango device and re-run step eight.
- If all went well you should be able to move your Project Tango device around and see the values being displayed in Android Studio via the Android Debugging Bridge (ADB). You are now ready to run through the rest of the examples or begin building your own application.
- Android Studio IDE and SDK Tools
- Android NDK
- Project Tango C API, Java API and Unity SDK
- Project Tango code samples and tutorials
- Oracle JVM
- Docker-Compose launch script example
- Well-commented Dockerfile that can easily be customized for your project
- UDEV rules to enable Project Tango Device (and other Google Vendor ID products)
- All required Linux libraries & package dependencies
- A few convenience tools I have found helpful
- Non-root Linux user with user and group IDs matched to the host system to allow graphical windows to be forwarded to the host's X server
Cheers, Todd