Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Glass Android Studio Gradle issues

I am trying to build my first Google Glass app, using Android Studio 0.5.4. But am getting a build error: Error:Module 'TestApplication-TestApplication': platform 'Google Inc.:Glass Development Kit Sneak Peek:15' not found.

enter image description here

As you can see the GDK, and all necessary library files are installed.

libs

I have looked at a few different questions about this already, primarily

  • Google Glass: GDK with Android Studio
  • Android Studio || GDK 'hello word' || import com.google.android.glass.app.Card || Cannot Resolve Symbol 'google'
  • Error:Module 'App name': platform 'android-15' not found

Which recommends to change compileSdkVersion in the build.gradle to this

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'])
}
like image 931
Andrew Gable Avatar asked Apr 12 '26 18:04

Andrew Gable


1 Answers

This issue seems to be resolved in Android Studio 0.5.5, so if you update via "Help->Check for Update..." it should work.

A workaround, if you still have problems:

  1. Open up the "Terminal" window
  2. Run gradlew installDebug each time you want to install the app (press "up" to recall the last command)

enter image description here

I had this issue with Android Studio 0.5.4, but on only one of two machines.

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. But, gradle from the command line still works fine.

like image 185
Sean Barbeau Avatar answered Apr 15 '26 10:04

Sean Barbeau



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!