[英]Google Glass Android Studio Gradle issues
I am trying to build my first Google Glass app, using Android Studio 0.5.4. 我正在尝试使用Android Studio 0.5.4构建我的第一个Google Glass应用。 But am getting a build error: Error:Module 'TestApplication-TestApplication': platform 'Google Inc.:Glass Development Kit Sneak Peek:15' not found.
但是我得到了一个构建错误: Error:Module 'TestApplication-TestApplication': platform 'Google Inc.:Glass Development Kit Sneak Peek:15' not found.
As you can see the GDK, and all necessary library files are installed. 如您所见,GDK和所有必需的库文件都已安装。
I have looked at a few different questions about this already, primarily 我主要已经看过几个关于此问题的不同问题
Which recommends to change compileSdkVersion
in the build.gradle
to this 建议将compileSdkVersion
中的build.gradle
更改为此
apply plugin: 'android'
android {
compileSdkVersion "Google Inc.:Glass Development Kit Sneak Peek:15"
buildToolsVersion "17.0.0"
defaultConfig {
minSdkVersion 15
targetSdkVersion 15
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
}
This issue seems to be resolved in Android Studio 0.5.5, so if you update via "Help->Check for Update..." it should work. 此问题似乎在Android Studio 0.5.5中得到解决,因此如果您通过“帮助 - >检查更新...”进行更新,它应该可以正常工作。
A workaround, if you still have problems: 解决方法,如果您仍有问题:
gradlew installDebug
each time you want to install the app (press "up" to recall the last command) 每次要安装应用程序时运行gradlew installDebug
(按“向上”调用最后一个命令) I had this issue with Android Studio 0.5.4, but on only one of two machines. 我在Android Studio 0.5.4中遇到过这个问题,但只有两台机器中的一台。
I started a Glass app in Android Studio on one machine and Android Studio built the app without any problems, and when I cloned the exact same project from Github on another machine Android Studio gave me the same error you're seeing - Error:Module 'onebusaway-android': platform 'Google Inc.:Glass Development Kit Sneak Peek:15' not found.
我在一台机器上的Android Studio中启动了一个Glass应用程序 ,而Android Studio在没有任何问题的情况下构建了应用程序,当我在另一台机器上从Github克隆完全相同的项目时,Android Studio给了我同样的错误 - Error:Module 'onebusaway-android': platform 'Google Inc.:Glass Development Kit Sneak Peek:15' not found.
But, gradle from the command line still works fine. 但是,从命令行gradle仍然可以正常工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.