问题
after a couple of weeks I have been unable to get the android set of tools to a functioning level with c++ before and have been given the opportunity of using a project tango, and though that sounds awesome and wondrous and would open a world of opportunity for working with VR... I feel like I am stuck at step -4. My understanding is limited, so bear with me.
I stumbled upon the PCL built for running algorithms on point cloud data, it was open source and appeared like a wonderful solution, it is written in C++ and I have a mild understanding of both c++ and java.
I have tried using Eclipse and the NDK and actually managed to get a project 'deployed' to the tango, however upon attempting to edit any file in the project, java or c++, it breaks and will never deploy again.
Now I am trying to use Android Studio, and after following about 5 conflicting tutorials on 'how to get C++/ndk working in android studio' I have yet to get a working environment.
So here is my question, and we can start at step one, any help is appreciated. How does one get c++ and the PCL working on a google project tango, is there a better way for someone of my skill level? The end result is a mapped 3d space with the project tango, with exportable data sets of manageable size. I have seen it done in demos on youtube, but thus far, like i said, I am stuck on step -4.
回答1:
we are working on converting all project to android studio based, for now, here is the walk around to get you started:
Open Android Studio, import the project from the repo you just cloned.
Take the motion-tracking-jni-example as the example, copy tango-gl-render, tango-service-sdk, and third-party into the motion-tracking-jni-example/app/src.
Run ndk-build in the motion-tracking-jni-example/app/src/main folder.
ndk will generate the libs folder, rename it to jniLibs.
Go to Android Studio, in build.gradle(Module:app) file, add line 'sourceSets.main.jni.srcDirs = []' to the defaultConfig section.
Just click the run button in Android Studio.
What we did here is basically disabled the Android Stdio's JNI compile and manually built it using ndk.
回答2:
Start with unity3d, its easy to get a working demo with a week with Unity3D. And support is very good, documentation is top notch.
Hope this will help.
回答3:
Tango NDK Tutorial Will help but the basic layout is
- Setup a new project
- Create your Java activity
- Create a JNI file to bridge Java to the C++
- Create your C++ logic
- Setup your Makefiles and Gradle (probably the most annoying part)
来源:https://stackoverflow.com/questions/28372418/how-do-i-begin-working-on-the-project-tango