Android Studio || GDK 'hello word' || import com.google.android.glass.app.Card || Cannot Resolve Symbol 'google'

后端 未结 3 1545
轻奢々
轻奢々 2020-12-20 19:51

What I am trying to do with my google glass is pretty simple: create/display a hello world card for google glass

issue is::

when i add this:

         


        
相关标签:
3条回答
  • 2020-12-20 20:07

    Why don´t you use a sample to start your project? New Project -> Other -> Android Sample Project You can use the StopWatch to make that.

    If you don´t want, be sure that your manifest has

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

    Check if the GDK Sneak Peek is installed.

    This message

    Cannot Resolve Symbol 'google'
    

    Look like a syntax error or a include error in your eclipse.

    Check is the Glass Development Kit Sneak Peep is include as our library. Right Click your project -> Properties -> Java Build path -> Libraries Check too is your Project Build Target is correct on Android option.

    0 讨论(0)
  • 2020-12-20 20:19

    It looks like you have things set up correctly, but Android Studio is still under development, and can still be a bit glitchy when it comes to libraries and add-ons. Here are some troubleshooting steps that may help:

    • Re-import your project
    • Under module settings -> Project -> Project SDK -> Edit..., make sure that the Build Target is "Glass Development Kit Sneak Peek"
    • 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.
    0 讨论(0)
  • 2020-12-20 20:25

    The top answer is a bit old. Since the GDK is no longer a sneak peek, use:

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

    Make sure you've downloaded the Glass Development Kit Preview from Tools > SDK Manager, and that you're running the latest version of Android Studio (0.55 and up.)

    0 讨论(0)
提交回复
热议问题