Cannot Resolve Symbol Google API Client in Android Studio

I'm getting an error in Android Studio for the following:

mGoogleApiClient = new GoogleApiClient.Builder(this)

I have put this in my manifest, <meta-data android:name="" android:value="@integer/google_play_services_version" />

and compile '' in my gradle dependencies.

I've downloaded the required sdk files as well.

Why do I still get this error?


For the benefit of searchers:

If you are following the android tutorial that relates to this, you can add the dependency via the UI.

  1. In Android Studio, go to File > Project Structure.
  2. Go to the dependencies tab.
  3. On the right hand side add a 'Library Dependency'.
  4. Type "" into the searchbox and pick the appropriate dependency.
  5. Then follow @Dmac's answer

Even though not officially listed in the tutorial, you must use the following imports:


I had to do the following to get my app to compile successfully:

  1. Update my build.grade with '<version>'
  2. Add imports as needed:

  3. In Android Studio: File --> Invalidate/Restart...

  4. Clean build

I had this problem, only with import;I unfortunately had moved <meta-data android:name="" android:value="@string/google_maps_key" /> after its relative activity <activity android:name=".MapsActivity" android:label="@string/title_activity_maps" ></activity>. I returned to previous state and the problem was solved.

Add following lines to your dependencies to use Google Places Api interfaces

dependecies{compile ''
testCompile 'junit:junit:4.12'


Just to log the problem.

This happens when there is version conflict. Check the build message, and it will suggest the version you should be importing.

The classpath version in main gradle (classpath '') should be complaint with the version of jar included in the app gradle (compile '')

the question is old ,but now that GoogleApiClient is deprecated I found out that I can't use it anymore and that one should use its substitute, subclasses of GoogleApi .

Need Your Help

Is F# really faster than Erlang at spawning and killing processes?

concurrency f# erlang actor

Updated: This question contains an error which makes the benchmark meaningless. I will attempt a better benchmark comparing F# and Erlang's basic concurrency functionality and inquire about the r...

How do I expand a tuple into variadic template function's arguments?

c++ c++11 arguments tuples

Consider the case of a templated function with variadic template arguments: