android - Android Studio 上的 Google Glass 编译错误

标签 android android-studio google-glass google-gdk

我正在尝试在 Android Studio 1.1.0 上创建一个 google glass 应用(基于沉浸式),并且出现此错误。

错误:无法标准化文件“C:\Users\admin\AndroidStudioProjects\Sampleapp\app\build\intermediates\mockable-Google Inc.:Glass Development Kit Preview:19.jar”的路径。 文件名、目录名或卷标语法不正确

我之前在 Eclipse 上尝试过,一切都运行良好,但在 Android Studio 中却有点奇怪。

更新

项目:build.gradle

apply plugin: 'com.android.application'

repositories {
    jcenter()
    flatDir {
        dirs 'prebuilt-libs'
    }
}

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

defaultConfig {
        applicationId "example.com.Sampleapp"
        minSdkVersion 19
        targetSdkVersion 19
        versionCode 1
        versionName "1.0"
    }

compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }
buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
}

最佳答案

如果您使用,则会出现此错误

classpath 'com.android.tools.build:gradle:1.1.0'

Glass 开发支持的最高级别的 Gradle 构建工具是

classpath 'com.android.tools.build:gradle:1.0.1'

关于android - Android Studio 上的 Google Glass 编译错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29089646/

相关文章:

android - 使用 Ionic 创建自定义相机 View

android - 如何在windows xp中安装Android SDK和eclipse?

android - 10000x11866 大 .PNG 图像在 Android Studio 中仍然模糊

java - 为什么我无法在 Play 商店中打开我的应用程序?

Android Studio 未检测到构建/运行时的代码更改(

android - 为什么 Glass 缺少 Google Play 服务?

google-glass - 如何从 GDK 调用 Mirror API?

java - 无法在 Android 内部存储中创建文件夹

google-glass - 有关于在 Google Glass 上使用 micro USB 端口的文档吗?

java - 在 Canvas 上绘制路径作为动画