无法建立谷歌的官方示例

时间:2017-05-28 18:15:22

标签: java android virtual-reality

我克隆存储库: https://github.com/googlevr/gvr-android-sdk/

我尝试在Android Studio中运行,没有改变任何内容,但我收到了错误:

Error:(39, 13) Failed to resolve: com.google.vr:sdk-base:1.60.
<a href="openFile:C:/Users/Vesbat/Documents/KODE/gvr-android-sdk/samples/sdk-controllerclient/build.gradle">Show in File</a><br><a href="open.dependency.in.project.structure">Show in Project Structure dialog

Error:(40, 13) Failed to resolve: com.google.vr:sdk-controller:1.60.1
<a href="openFile:C:/Users/Vesbat/Documents/KODE/gvr-android-sdk/samples/sdk-controllerclient/build.gradle">Show in File</a><br><a href="open.dependency.in.project.structure">Show in Project Structure dialog

Error:(39, 13) Failed to resolve: com.google.vr:sdk-panowidget:1.60.1
<a href="openFile:C:/Users/Vesbat/Documents/KODE/gvr-android-sdk/samples/sdk-simplepanowidget/build.gradle">Show in File</a><br><a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>

Error:(39, 13) Failed to resolve: com.google.vr:sdk-videowidget:1.60.1
<a href="openFile:C:/Users/Vesbat/Documents/KODE/gvr-android-sdk/samples/sdk-simplevideowidget/build.gradle">Show in File</a><br><a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>

Error:(40, 13) Failed to resolve: com.google.vr:sdk-base:1.60.1
<a href="openFile:C:/Users/Vesbat/Documents/KODE/gvr-android-sdk/samples/sdk-treasurehunt/build.gradle">Show in File</a><br><a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>

Error:(39, 13) Failed to resolve: com.google.vr:sdk-audio:1.60.1
<a href="openFile:C:/Users/Vesbat/Documents/KODE/gvr-android-sdk/samples/sdk-treasurehunt/build.gradle">Show in File</a><br><a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>

Error:(43, 13) Failed to resolve: com.google.vr:sdk-common:1.60.1
<a href="openFile:C:/Users/Vesbat/Documents/KODE/gvr-android-sdk/samples/sdk-videoplayer/build.gradle">Show in File</a><br><a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>

Error:(42, 13) Failed to resolve: com.google.vr:sdk-base:1.60.1
<a href="openFile:C:/Users/Vesbat/Documents/KODE/gvr-android-sdk/samples/sdk-videoplayer/build.gradle">Show in File</a><br><a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>

4 个答案:

答案 0 :(得分:1)

替换为每个文件build.gradle

Dependencies {
Compile 'com.google.vr: sdk-audio: 1. +'
Compile 'com.google.vr: sdk-base: 1. +'
}

编译后会崩溃,更新并且错误消失。

答案 1 :(得分:1)

问题#1:

他们使用自25.5.2017 libs V 1.60。 1 ,但在全球回购时,当前没有1.60.1,请参见此处:https://bintray.com/google/googlevr/sdk-audio#files/com/google/vr/sdk-audio

作为临时解决方案,您可以切换到1.60。 0 返回

问题#2:

当你这样做时,你会遇到一个不兼容的Gradle插件版本(他们使用旧版本)

classpath 'com.android.tools.build:gradle-experimental:0.9.0-beta4'

更改为

classpath 'com.android.tools.build:gradle-experimental:0.9.2'

答案 2 :(得分:0)

编译googles gvr android sdk代码时出现构建错误问题 来自https://github.com/googlevr/gvr-android-sdk。 如果您遇到构建问题,请更新您的项目

classpath 'com.android.tools.build:gradle-experimental:0.9.0-beta4'

classpath 'com.android.tools.build:gradle-experimental:0.9.3'

将您的依赖关系从1.60.1更新为1.60.0

它将解决构建问题。

谢谢,

快乐编码

答案 3 :(得分:0)

您可以使用从github存储库下载的aar文件sdk-base-1.200.0.aar添加vr sdk依赖项。该文件位于库文件夹中。如果您是androidstudio的新手,请参考此链接 http://docs.onemobilesdk.aol.com/android-ad-sdk/adding-aar-files.html