简体   繁体   中英

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.

Error:Could not normalize path for file '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.

Update

Project: 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

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

You could use a classpath of 1.1.+ instead. Either way, it probably has something to do with the inability of Gradle to escape the dot after Google Inc. in the path.

Let me know if that works for you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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