GearVRf入门

时间:2016-11-08 13:32:25

标签: java android gear-vr

我正试图在gearVR上开发应用程序。

我想使用gearvrf,因为我认为它可以让我轻松使用我已经为纸板应用程序编写的Java代码。但是,我无法构建示例应用程序。

我遵循这里的指示:
https://resources.samsungdevelopers.com/Gear_VR/020_GearVR_Framework_Project/020_Get_Started

但是当我构建任何示例应用程序时,我得到:

Error:Failed to resolve: :backend_daydream-debug:
Error:Failed to resolve: :framework-debug:
Error:Failed to resolve: :backend_oculus-debug:

并在构建日志

Error:A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugCompile'.
> Could not find :framework-debug:.
 Searched in the following locations:
     file:/C:/Program Files/Android/Android Studio/gradle/m2repository//framework-debug//framework-debug-.pom
     file:/C:/Program Files/Android/Android Studio/gradle/m2repository//framework-debug//framework-debug-.aar
     https://jcenter.bintray.com//framework-debug//framework-debug-.pom
     https://jcenter.bintray.com//framework-debug//framework-debug-.aar
     file:/C:/dev/GearVRf-Demos/gearvrf-libs/framework-debug-.aar
     file:/C:/dev/GearVRf-Demos/gearvrf-libs/framework-debug.aar
     file:/C:/dev/GearVRf/GVRf/Framework/framework/build/outputs/aar/framework-debug-.aar
     file:/C:/dev/GearVRf/GVRf/Framework/framework/build/outputs/aar/framework-debug.aar
     file:/C:/Android/sdk/extras/android/m2repository//framework-debug//framework-debug-.pom
     file:/C:/Android/sdk/extras/android/m2repository//framework-debug//framework-debug-.aar
     file:/C:/Android/sdk/extras/google/m2repository//framework-debug//framework-debug-.pom
     file:/C:/Android/sdk/extras/google/m2repository//framework-debug//framework-debug-.aar
     file:/C:/Android/sdk/extras/m2repository//framework-debug//framework-debug-.pom
     file:/C:/Android/sdk/extras/m2repository//framework-debug//framework-debug-.aar
 Required by:
     gvr-tutorial-lesson2:app:unspecified
> Could not find :backend_oculus-debug:.
 Searched in the following locations:
     file:/C:/Program Files/Android/Android Studio/gradle/m2repository//backend_oculus-debug//backend_oculus-debug-.pom
     file:/C:/Program Files/Android/Android Studio/gradle/m2repository//backend_oculus-debug//backend_oculus-debug-.aar
     https://jcenter.bintray.com//backend_oculus-debug//backend_oculus-debug-.pom
     https://jcenter.bintray.com//backend_oculus-debug//backend_oculus-debug-.aar
     file:/C:/dev/GearVRf-Demos/gearvrf-libs/backend_oculus-debug-.aar
     file:/C:/dev/GearVRf-Demos/gearvrf-libs/backend_oculus-debug.aar
     file:/C:/dev/GearVRf/GVRf/Framework/framework/build/outputs/aar/backend_oculus-debug-.aar
     file:/C:/dev/GearVRf/GVRf/Framework/framework/build/outputs/aar/backend_oculus-debug.aar
     file:/C:/Android/sdk/extras/android/m2repository//backend_oculus-debug//backend_oculus-debug-.pom
     file:/C:/Android/sdk/extras/android/m2repository//backend_oculus-debug//backend_oculus-debug-.aar
     file:/C:/Android/sdk/extras/google/m2repository//backend_oculus-debug//backend_oculus-debug-.pom
     file:/C:/Android/sdk/extras/google/m2repository//backend_oculus-debug//backend_oculus-debug-.aar
     file:/C:/Android/sdk/extras/m2repository//backend_oculus-debug//backend_oculus-debug-.pom
     file:/C:/Android/sdk/extras/m2repository//backend_oculus-debug//backend_oculus-debug-.aar
 Required by:
     gvr-tutorial-lesson2:app:unspecified
> Could not find :backend_daydream-debug:.
 Searched in the following locations:
     file:/C:/Program Files/Android/Android Studio/gradle/m2repository//backend_daydream-debug//backend_daydream-debug-.pom
     file:/C:/Program Files/Android/Android Studio/gradle/m2repository//backend_daydream-debug//backend_daydream-debug-.aar
     https://jcenter.bintray.com//backend_daydream-debug//backend_daydream-debug-.pom
     https://jcenter.bintray.com//backend_daydream-debug//backend_daydream-debug-.aar
     file:/C:/dev/GearVRf-Demos/gearvrf-libs/backend_daydream-debug-.aar
     file:/C:/dev/GearVRf-Demos/gearvrf-libs/backend_daydream-debug.aar
     file:/C:/dev/GearVRf/GVRf/Framework/framework/build/outputs/aar/backend_daydream-debug-.aar
     file:/C:/dev/GearVRf/GVRf/Framework/framework/build/outputs/aar/backend_daydream-debug.aar
     file:/C:/Android/sdk/extras/android/m2repository//backend_daydream-debug//backend_daydream-debug-.pom
     file:/C:/Android/sdk/extras/android/m2repository//backend_daydream-debug//backend_daydream-debug-.aar
     file:/C:/Android/sdk/extras/google/m2repository//backend_daydream-debug//backend_daydream-debug-.pom
     file:/C:/Android/sdk/extras/google/m2repository//backend_daydream-debug//backend_daydream-debug-.aar
     file:/C:/Android/sdk/extras/m2repository//backend_daydream-debug//backend_daydream-debug-.pom
     file:/C:/Android/sdk/extras/m2repository//backend_daydream-debug//backend_daydream-debug-.aar
 Required by:
     gvr-tutorial-lesson2:app:unspecified

如何让示例应用程序正常运行?

1 个答案:

答案 0 :(得分:2)

您需要生成库文件(aar)并将其复制到

gearvrf-libs 目录,如果您使用的是来自https://github.com/gearvrf/GearVRf-Demos的演示

在项目中,您可以将库文件放在 libs 目录中,并在gradle文件中引用它们