0

I have a strange issue with Android Studio. It doesn't find the symbol references to the Google Play Services libs, as you can see in the picture:

enter image description here

My build.gradle file is looking like this:

apply plugin: 'android'

android {
    compileSdkVersion 19
    buildToolsVersion "19.0.0"

    defaultConfig {
        minSdkVersion 8
        targetSdkVersion 8
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
}

dependencies {
    compile 'com.android.support:appcompat-v7:19.0.0'
    compile 'com.android.support:support-v4:19.0.+'
    compile 'com.google.android.gms:play-services:4.1.32'
}

The strange thing, is that I can build and even Run the application in my phone with no problem. This problem makes the IDE so useful as the notepad, when I want to use the com.google.android.gms.* library. How can I solve this issue?

I'm using version 0.4.2

Agustin Meriles
  • 4,866
  • 3
  • 29
  • 44
  • There's an issue with 0.4.2 that's documented here: http://stackoverflow.com/questions/21100688/android-studio-0-4-2-suddenly-cannot-resolve-symbols/21100896#21100896 It should hopefully be fixed in 0.4.3, which is available in the canary update channel. You can try upgrading, or if you don't want to upgrade, follow the instructions in the answer to that question. If you have problems with 0.4.3, definitely let us know -- there may be some lingering problems we need to address. – Scott Barta Jan 24 '14 at 20:07
  • Alright @ScottBarta, I will try updating – Agustin Meriles Jan 24 '14 at 20:10
  • Yeap @ScottBarta, now is working fine :D Thanks! – Agustin Meriles Jan 24 '14 at 20:13

1 Answers1

2

Please have a look in to this

Import Google Play Services library in Android Studio

Another workaround is :

Android Studio suddenly cannot resolve symbols

It was an issue in Android Studio 0.4.2 which is resolved in latest release 0.4.3, I recommend you to update your Android Studio.

Community
  • 1
  • 1
Piyush Agarwal
  • 25,608
  • 8
  • 98
  • 111