谷歌玻璃:GDK与Android工作室 [英] Google Glass: GDK with Android Studio
问题描述
我尝试使用新的谷歌玻璃开发工具包与Android的工作室。不幸的是,我没有太多的成功。
I’m trying to use the new Google Glass Development kit with Android Studio. Unfortunately I'm not having much success.
我得到的错误:摇篮:包com.google.android.glass.touchpad不存在
I get the error: "Gradle: package com.google.android.glass.touchpad does not exist"
我添加使用 - 库清单如下:
I've added uses-library to the manifest as follows:
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@android:style/Theme" >
<uses-library
android:name="com.google.android.glass"
android:required="true" />
<activity
android:name="com.glass.test.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
然后,我已经添加了gdk.jar到libs目录。我也增加了以下我build.gradle的依赖部分。
Then I've added the gdk.jar to the libs directory. And I've added the following to the dependency section of my build.gradle.
dependencies {
compile files('libs/gdk.jar')
}
任何帮助,这将是非常美联社preciated。
Any help with this would be very appreciated.
推荐答案
更改 compileSdkVersion
在 build.gradle
文件来直接引用GDK附加:
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...
}
(将 buildToolsVersion
可晚于19.0.2,如果你已经安装了,只要SDK的更高版本,它至少19.0.2。)
(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.)
这篇关于谷歌玻璃:GDK与Android工作室的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!