0

in my application I was using LocationManager and now I want to use Fused Location Services I'm using Android Studio 1.1.0 and added google play service library in gradle

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile project(':pull_to_refresh')
compile project(':uil_library')
compile project(':viewPagerIndicatorLib')
compile files('libs/date4j.jar')
compile 'com.android.support:appcompat-v7:21.0.3'
compile 'com.android.support:cardview-v7:21.0.3'
compile 'com.android.support:recyclerview-v7:21.0.3'
compile 'com.google.maps.android:android-maps-utils:0.3.+'
compile 'joda-time:joda-time:2.7'
compile 'com.github.shell-software:fab:1.0.5'
compile 'com.google.android.gms:play-services:6.5.87'
}

but when I define GoogleApiClient variable it says

Cannot resolve symbol 'GoogleApiClient'

So I click alt+Enter to import it but it show 'Add library 'google-play-service-6.5.8.7' to classpath' so I click it and when I run my app it show error

Error:(9, 41) error: package com.google.android.gms.common.api does not exist Error:(23, 13) error: cannot find symbol class GoogleApiClient

How can I solve this problem and what caused it in first place .

Filburt
  • 17,626
  • 12
  • 64
  • 115
Ma7moud El-Naggar
  • 548
  • 1
  • 6
  • 18

1 Answers1

0

I feel very Stupid :) this gradle was in my main app but I was using GoogleApiClient in Library project so I must add compile 'com.google.android.gms:play-services:6.5.87' to my library too

Ma7moud El-Naggar
  • 548
  • 1
  • 6
  • 18