Android Studio || GDK 'hello word' || import com.google.android.glass.app.Card || Unable to resolve google symbol

What I'm trying to do with my google glass is pretty simple: create / display a welcome map for Google Glass

issue is ::

when i add this:

import com.google.android.glass.app.Card 

I get:

 Cannot Resolve Symbol 'google' 

I did this :

Minimum and target versions of the SDK: 15 (There is only one version of Glass, so the minimum and target SDKs are the same). Compile with: Glass Development Kit Sneak Peek.

and I made changes to the gradel.build file [compile sdk version ... it was 15 / changed to what is lower]

 android { compileSdkVersion "Google Inc.:Glass Development Kit Sneak Peek:15" buildToolsVersion "19.0.0" defaultConfig { minSdkVersion 15 targetSdkVersion 15 } } 

It seems to me that I'm missing something simple / asking a problem / I don’t know what it is.

got any offers?

+6
source share
3 answers

It looks like you have everything right, but Android Studio is still under development and may still be a little buggy when it comes to libraries and add-ons. Below are some troubleshooting steps that may help:

  • Reimport your project
  • In the module settings β†’ Project β†’ SDK project β†’ Change ... make sure that the assembly object is the β€œSneak Peek Glass Development Kit”.
  • And if all else fails, you can add gdk.jar, found in sdk/add-ons/addon-google_gdk-google-15/libs , to your classpath by adding it as an external library.
+12
source

The top answer is a bit outdated. Since the GDK is no longer peeping, use:

 compileSdkVersion "Google Inc.:Glass Development Kit Preview:19" 

Make sure you download the Glass Development Kit preview from Tools> SDK Manager and that you are using the latest version of Android Studio (0.55 and higher).

+5
source

Why aren't you using a sample to run your project? New project β†’ Other β†’ Android example You can use StopWatch to do this.

If you do not want, make sure your manifest has

 <uses-sdk android:minSdkVersion="15" android:targetSdkVersion="15" /> 

Check if PKK Sneak GDK is installed.

This message

 Cannot Resolve Symbol 'google' 

See how a syntax error or inclusion error in your eclipse.

Check that the Sneak Peep Glass Development Kit is part of our library. Right-click your project -> Properties -> Java Build Path -> Libraries. Also check that your project build target is correct for Android.

-2
source

All Articles