Google VR cardboard尋寶程序編譯問題

默認NDK-treasureHunt-sample gradle問題

導入官方samples後,本人選擇編譯的NDK尋寶模塊,發現gradle的配置有問題。不管jcenter還是marvenCentral都找不到那幾個sdk的依賴。
這裏寫圖片描述

首先,在treasurehunt下面新建libs文件夾,將libraries的aar拷貝過去。更改根目錄的gradle如下:

    repositories {
        flatDir {
            dirs 'libs'
        }
        // For GVR components, the official source of the .aars is the Google
        // repository.
        maven {
            url "http://google.bintray.com/googlevr"
        }
        // We also use components from JCenter.
        jcenter()
        // You can also use a local Maven repository if desired.
        mavenLocal()
    }

然後更改ndk模塊下的gradle文件如下:

dependencies {
    compile (name:'sdk-audio-1.10.0',ext:'aar')
    compile (name:'sdk-base-1.10.0',ext:'aar')
    compile (name:'sdk-common-1.10.0',ext:'aar')
    compile ('com.google.protobuf.nano:protobuf-javanano:3.1.0')
}

最後,執行gradle的task:extractNdk
這裏寫圖片描述

發佈了57 篇原創文章 · 獲贊 21 · 訪問量 13萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章