Google Glass: GDK with Android Studio

故事扮演 提交于 2019-11-30 01:57:16
Tony Allevato

Change the compileSdkVersion in your build.gradle file to refer directly to the GDK add-on:

android {
    compileSdkVersion "Google Inc.:Glass Development Kit Preview:19"
    buildToolsVersion "19.0.2"

    // other stuff...
}

(The buildToolsVersion can be newer than 19.0.2 if you have a higher version of the SDK installed, as long as it's at least 19.0.2.)

Today is 1/10/2015, and from now on, the best option becomes:

Change the compileSdkVersion in your build.gradle file to refer directly to the GDK add-on:

android {
    compileSdkVersion "Google Inc.:Glass Development Kit Preview:19"
    buildToolsVersion "19.1.0"

    // other stuff...
}

You should install 19.1.0 build tools first.

did you try right clicking on the jar in the libs folder and hitting "add as library"?

EDIT: I've found that you have to do that in addition to adding it in module settings and the build.gradle. Also a clean/rebuild with gradle may make it work as well.

After KitKat, changing compileSdkVersion to "Google Inc.:Glass Development Kit Preview:19" worked for me. Note: I also had to restart Android Studio after installing the GDK Preview from it's built in SDK Manager. The GDK Preview wasn't recognized by Android Studio until I restarted.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!