googlevr / cardboard

Open source Cardboard SDK and samples
Other
1.46k stars 242 forks source link

How to import The SDK into Android Studio #449

Open mrtineu opened 4 months ago

mrtineu commented 4 months ago

I know it is a silly question but because the lack of explenatory docs I cant find how to import into new android project without the sample app.

lneumarkt commented 4 months ago

Thank you for reaching out to us!

To integrate the Cardboard SDK to an existing Android project you would need to follow these steps:

  1. Clone the cardboard repository.
  2. In Android Studio, import the cardboard project into your Android project by following these steps.
    1. Click File > New > Import Module.
    2. In the Source directory box, type or select the directory of the Cardboard folder.
    3. Uncheck the hellocarboard-android module to only import the SDK module.

import_sdk_android_studio

  1. Copy the proto and third party folders into your project’s root directory.
  2. If necessary: Add the following line in the sdk build.gradle file with inside de android scope: “com.google.cardboard.sdk”.

Please let us know if you need further help integrating your project with the Cardboard SDK..

Thanks!