Reputation: 29
i want to import these libraries but they are giving me an error which says "cannot resolve symbol 'android'". I don't know why i can't import them.
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.api.GoogleApiClient;
import com.google.android.gms.location.LocationListener;
import com.google.android.gms.location.LocationRequest;
import com.google.android.gms.location.LocationServices;
i want to use GPS/location services in my app and i have the latest android studio version. Does anyone know why am i getting this error.
Thanks.
Upvotes: 0
Views: 1076
Reputation: 67189
It sounds like you missed the first step of setting up Google Play Services, which is adding the dependencies to your build.gradle.
For location services, you need the following:
dependencies {
compile 'com.google.android.gms:play-services-maps:8.1.0'
}
Upvotes: 1