Sign in Go Pro

Build a Google VR App

Build your first VR app in Ten Minutes

 
Autoplay

Up next

About

The Google VR SDK supports both the Daydream and Cardboard VR platforms. We'll see how to build a basic 3D scene, and render it in stereoscopic 3D.

In this lesson you'll learn:

  • The basics of GL rendering and GL threads.
  • How to build a simple 3D scene using the Rajawali library.
  • Creating simple 3D objects
  • Basic Lighting
  • Basic Materials
  • Basic Animation
  • Converting a simple 3D scene into a stereoscopic Google VR scene.

Supported Versions:

  • Android Studio 3.3

Links

Comments

Hello Etienne.

I am trying to run the sample, from this URL:
https://github.com/kanawish/caster-samples-3d/tree/master/rajaVrDemo

First question: is this the correct link do run your app?

Anyway, when I open this app in Android Studio, I can't run the app. See:
http://bit.ly/2sqDDIK

I believe you'll need to import the project from the root (https://github.com/kanawish/caster-samples-3d) to get it to work with Android Studio.

Could you try it out and see if it helps?

Hello Etienne.

I did what you advised me. Then, Android Studio requested to update the build.gradle of all the modules of this app.
I did that. But then, that happened:

http://bit.ly/2sCduqF

The Android Studio asks to click "Try Again", and if I try to run the app the option "Run" is unmarked. See:
http://bit.ly/2QPwiMG

Hello Rodrigo,

I've just up-ticked the version numbers on the repo, and got things in decent order again. You might still need to tweak the build.gradle file depending on what version of Android Studio you are using.

Hope this helps!

Now it says that Error: Invoke-customs are only supported starting with Android O (--min-api 26):
http://bit.ly/2FClSia

Researching this in Stack Overflow I find that thread:
https://stackoverflow.com/a/50198499

But this compileOptions with sourceCompatibility JavaVersion.VERSION_1_8 and targetCompatibility JavaVersion.VERSION_1_8 is already set in the project.

Hello Rodrigo, I've just pushed some final fixes for the build scripts. I've tested that the lesson code ( :rajaVrDemo, rajaDemo and glEpisodes) runs and compiles, so you should be good to go. The project now depends on Android Studio 3.3. It should work with recent stock emulators and physical devices.

Please note, I've removed some of the modules that were not part of the lessons. I've moved that exploratory code over to "https://github.com/kanawish/mixed-reality-toolbox" some time ago.

Thank you for your patience!

Still, error happens!!
See:

http://bit.ly/2COeBbn
http://bit.ly/2FQW427
http://bit.ly/2TgS5yR

Hello Rodrigo, I've just tried again on my machine, things still seem to build fine here.

We have the same version #s re: Android Studio, and from the screenshots, looks like you have the correct, latest version checked out. Emulator also looks like the right version.

I'd suggest File > Invalidate Caches / Restart..., then make sure you're running a clean build.

Only other thing I can think of for now would be to check the following thread on stack overflow:
https://stackoverflow.com/questions/49891730/invoke-customs-are-only-supported-starting-with-android-0-min-api-26

The Java version installed on your system, or Instant Run being turned on might impact the build. Please try this out and let me know how it goes.

Still, now working.
I gave up.

Sorry to hear that. If ever you pick that up again, let me know, and I'll be happy to try and help.

Also, I keep an eye on my Github issues for this and my other repos. For you or any other readers, you can add issues there as well. I'll do my best to reproduce and fix issues.

>
You need to go PRO to post comments.

Lessons in Build a Google VR App