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:
So my Project Structure started off looking like this...
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!
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!)
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!
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.