最近下了个google的vr sdk,下载地址:https://github.com/googlevr/gvr-android-sdk,因为没有开源,所以只能拿java反编译去看,幸好大部分代码都能看到(除了native的),一边看官方文档一边看代码,下面记录下之间遇到的一些问题:
1、编出来老是xml错误:首先看libraries/native/README.md,按照其中步骤操作。我用的是video那个例子,打开对应sample目录下的build.gradle,编辑如下
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
minSdkVersion 19
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
/** See the documentation in libraries/native/README.md regarding architectures.**/
sourceSets {
main {
jniLibs.srcDir file('jniLibs/')
}
}
/** Use this to r