How to start using rajawali vr

2.2k Views Asked by At

I'm using Android Studio. I want to use Rajawali library, especially the vr package. I add the following line to build.gradle as described in GitHub.

compile 'org.rajawali3d:rajawali:1.0.325@aar'

Then I am able to use some classes in Rajawali library, such as RajawaliRenderer. But when I import package org.rajawali3d.vr, Android Studio says " Cannot resolve symbol 'vr' ". What am I doing wrong? How to fix it?

1

There are 1 best solutions below

2
On

I finally solve it. Adding the line below into build.gradle only imports rajawali package into your project.

compile 'org.rajawali3d:rajawali:1.0.325@aar'

The other sub-packages like VR, Vuforia are not imported, so you need to do it manually.

Follow the steps below:

  1. Go to https://github.com/Rajawali/Rajawali and download the entire library.
  2. Go to Rajawali-master\vr\src\main\java\org\rajawali3d. Copy the vr folder into your project.
  3. Go to Rajawali-master\vr\libs. Copy audio.jar and cardboard.jar to app\libs in your project.
  4. Select the two jar files, right click and choose "Add as Library...".
  5. Done.

Note that you still have to add rajawali dependency in build.gradle first.