简体   繁体   English

Google Glass在Android Studio上编译错误

[英]Google Glass compile error on Android Studio

I'm trying to create a google glass app(immersion based) on Android Studio 1.1.0 and this error throws up. 我正在尝试在Android Studio 1.1.0上创建一个谷歌眼镜应用程序(基于沉浸式),并且抛出此错误。

Error:Could not normalize path for file 'C:\\Users\\admin\\AndroidStudioProjects\\Sampleapp\\app\\build\\intermediates\\mockable-Google Inc.:Glass Development Kit Preview:19.jar'. 错误:无法规范文件“ C:\\ Users \\ admin \\ AndroidStudioProjects \\ Sampleapp \\ app \\ build \\ intermediates \\ mockable-Google Inc.:Glass Development Kit Preview:19.jar”的路径。 The filename, directory name, or volume label syntax is incorrect 文件名,目录名称或卷标签语法不正确

I previously tried on eclipse and it all worked fine but in Android Studio it's a little weird. 我以前尝试过eclipse,但一切正常,但是在Android Studio中有点奇怪。

Update 更新

Project: build.gradle 项目: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')
}

This error appears if you use 如果您使用此错误出现

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

The highest level of Gradle build tools supported for Glass development is Glass开发支持的最高级别的Gradle构建工具是

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

You could use a classpath of 1.1.+ instead. 您可以改用1.1.+的类路径。 Either way, it probably has something to do with the inability of Gradle to escape the dot after Google Inc. in the path. 无论哪种方式,都可能与Gradle无法在路径中逃脱Google Inc.之后的点有关。

Let me know if that works for you. 让我知道这是否适合您。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM