我正在尝试在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


您如何使示例应用程序正常工作?

最佳答案

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

如果您正在使用https://github.com/gearvrf/GearVRf-Demos中的演示,请选择gearvrf-libs目录

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

09-25 22:55