Search code examples
androidandroid-studiogoogle-glassgoogle-gdk

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')
}

Solution

  • 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.