Google Tango and OpenFrameworks

Hello everyone,

I have always wanted to use openframeworks and I’m ready to get my hands dirty :slight_smile: I recently received a Google Tango device and want to build an application for it. For a fast prototype, I have decided to use openframeworks and not unreal engine or unity. I think openframeworks can benefit from my progress with the integration of Google Tango’s C API in a openframeworks plugin, so I will document my progress here and ask for questions :slightly_smiling:

I am working on OSX 10.11.3 El Capitan.

I have my first problem compiling the androidemptyexample. I followed the setup guide and get the following problem from libs/openFrameworksCompiled/project/android/build.gradle:
Error:(157, 0) Cause: make failed with exit status 2

Here is the code section:

  • Helper function to run make with a given set of options
    def ofRunMake(List opts) {
    def num_parallel = ofNdkSetup.ext.num_parallel
    if (num_parallel > 1) {
    opts.add(0, “-j$num_parallel”)
    List cmd = [ofNdkSetup.ext.make] + opts“Executing make command " + cmd)
    def proc = cmd.execute() {line ->
    proc.err.eachLine {line ->
    if(line.contains(”: warning:")) {
    } else if(line.contains(": error:") || line.contains(": ***")) {
    } else {
    if(proc.exitValue() != 0) {
    throw new GradleException("make failed with exit status " + proc.exitValue())

I am a gradle newbie, so this will be a big challenge :wink: I have absolutely no clue where this comes from.

Other people will give you a more exact answer, but I was having similar problems, as soon as I switched to of0.9.2 master everything was smooth and the instructions worked as expected (after much searching and time wasting), maybe it will work for you too.

yeah 0.9.0 can still be built with the old Eclipse Method and that is what I used for my last OF+Android project.

The latest bugfix releases address the Android Studio issue. Try running off master

also can you post a link to your progress online? I have access to a bunch of Tango devices but haven’t messed around with them much.

I will try 9.2. This is the first time I am contributing to open source. What do you mean by post a link to your progress online? Here is the github fork: I will document my progress here.

Checked out the master branch, just changed the NDK_ROOT in the compiled openframeworks lib and imported the androidexampleproject into android studio. This the same error like 5 posts before this one when gradle tries to sync the project.

@cconnection any developments on this? trying to get the same set up for google cardboard and running into this issue