Google Play Services Library Update and Missing Symbol @Integer/Google_Play_Services_Version

Google Play Services Library update and missing symbol @integer/google_play_services_version

Please note that this fix may only apply to IntelliJ users!! (More information at the bottom of this post that should apply to everyone.)

Fixed this problem! I use IntelliJ and it turns out I just had misconfigured the way I was including the google-play-services_lib module as a dependency.

As I fixed this entirely through GUI and not at all by editing any files, here's a couple of screenshots:

Step 1 - Initial Project Structure
So my Project Structure started off looking like this...

Step 2 - Removed google-play-services library
Then I removed the google-play-services library from my dependencies list by selecting it and then clicking the minus button at the bottom. Notice the error at the bottom of the dialog, as my project absolutely does require this library. But don't worry, we'll re-add it soon!

Step 3 - Added google-play-services as a module dependency
Next I added google-play-services_lib as a module dependency instead of a library dependency. Then I hit the up arrow button at the bottom a couple times to move this dependency to the top of the list. But notice the error at the bottom (we're still not done yet!)

Step 4 - Click the lightbulb to add the google-play-services library as a dependency
I then clicked the lightbulb at the bottom of the dialog in the error message area to bring up this little small popup that gives two choices (Add to dependencies... or Remove Library). Click the Add to dependencies... option!

Step 5 - Add the library to the google-play-services_lib module
A new small dialog window should have popped up. It gave me two choices, one for my main project (it's name is blurred out), and then another for the google-play-services_lib project. Yours may have a bunch more depending on your project (like you may see actionbarsherlock, stuff like that). Select google-play-services_lib and click okay!

And finally, you're done! I hope this helps someone else out there!

Further info

I believe the reason that this issue was happening to begin with is because I thought that I had properly included the entire google-play-services_lib project into my overall project... but I actually had not, and had instead only properly included its jar file (google-play-services_lib/libs/google-play-services.jar). That jar file only includes code, not Android resources values, and so as such the @integer/google_play_services_version value was never really in my project. But the code was able to be used in my project, and so that made it seem like everything was fine.

And as a side note, fixing this issue also seems to have fixed the GooglePlayServicesUtil.getErrorDialog(...).show() crash that I used to have. But that could also have been fixed by the update, not really 100% sure there.

cant resolve symbol for google play services in android manifest

Did you make sure to update the build.gradle file with

compile 'com.google.android.gms:play-services:5.+'

and to rebuild/clean the project?

Make sure you're not working offline and you have a good Internet connection (the gradle needs to be able to access the Internet)

Cannot resolve symbol @integer/google_play_services_version for intellij

Try adding this in the build.gradle file:

dependencies {
compile 'com.google.android.gms:play-services:7.5.0'
}

Error with google_play_services_version value from aar library

I think it is not honoring the play resources, because you don't have transient dependencies on you aar. You are importing your own aar with the artifact only notation (see Section 52.4.1.2). If you want the dependencies to be transitive you have to explicitly set them to be so (as you did in your library build file.

dependencies {
compile(group: 'com.myapplib', name: 'myapplib', version: '1.0.3', ext: 'aar') {
transitive = true;
}
}

Android google play services not working properly

You are still using an old version of PLAY Service because Places was added in version v.9.4 as mention in the official docs releases too

so simply update your gms dependencies to latest one i.e.

compile 'com.google.android.gms:play-services:11.6.0' 

You can also add individual API using appropriate version as mention under Table 1 here

So use individual API if you can because this will avoid the need of Multudex in future although there is no Individual APP INDEXING API build.gradle description mention in the docs



Related Topics



Leave a reply



Submit