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:
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.
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
How to Access the Drawable Resources by Name in Android
Passing Arraylist Through Intent
What Characters Allowed in File Names on Android
Actionbar Not Shown with Appcompat
How to Set a Gradient Background in a Material Button from Material Components
How Does One Use Glide to Download an Image into a Bitmap
How to Capture the Android Device Screen Content
How to Open a Second Activity on Click of Button in Android App
How to Set Layout_Weight Attribute Dynamically from Code
In Android, How to Set Margins in Dp Programmatically
Get Content Uri from File Path in Android
Android Studio Gradle Build Speed Up
Create Aar File in Android Studio
Android Backup/Restore: How to Backup an Internal Database
How to Use Library That Used Android Support with Androidx Projects